]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
omap2: convert prcm.c to use symbolic register & register bit constants
authorPaul Walmsley <paul@pwsan.com>
Thu, 3 May 2007 22:52:54 +0000 (16:52 -0600)
committerTony Lindgren <tony@atomide.com>
Fri, 25 May 2007 18:27:21 +0000 (11:27 -0700)
Replace magic numbers and prcm-regs.h-sourced defines, for readability
and in preparation to remove prcm-regs.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/prcm.c

index 90f530540c6529138c6a9e6a77d4ec21c7095d72..9af88488edeef240c0ddbd49a5a2bb622f714b36 100644 (file)
 #include <linux/init.h>
 #include <linux/clk.h>
 
-#include "prcm-regs.h"
+#include "prm.h"
+#include "prm_regbits_24xx.h"
 
 extern void omap2_clk_prepare_for_reboot(void);
 
 u32 omap_prcm_get_reset_sources(void)
 {
-       return RM_RSTST_WKUP & 0x7f;
+       return prm_read_mod_reg(WKUP_MOD, RM_RSTST) & 0x7f;
 }
 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
 
 /* Resets clock rates and reboots the system. Only called from system.h */
 void omap_prcm_arch_reset(char mode)
 {
+       u32 wkup;
        omap2_clk_prepare_for_reboot();
-       RM_RSTCTRL_WKUP |= 2;
+       wkup = prm_read_mod_reg(WKUP_MOD, RM_RSTCTRL) | OMAP_RST_DPLL3;
+       prm_write_mod_reg(wkup, WKUP_MOD, RM_RSTCTRL);
 }