diff options
author | Paul Walmsley <paul@pwsan.com> | 2008-03-18 10:04:51 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-04-14 10:29:37 -0700 |
commit | 445959821f82846913fe09fee0573e0238415e8c (patch) | |
tree | 38d0ec8fd827017e21961a42a58a9bcaaede7c6e /arch/arm/mach-omap2/prcm.c | |
parent | c595713da76bc7cedddf5135072ea6037cc0befb (diff) | |
download | blackbird-op-linux-445959821f82846913fe09fee0573e0238415e8c.tar.gz blackbird-op-linux-445959821f82846913fe09fee0573e0238415e8c.zip |
ARM: OMAP2: Change 24xx to use new register access
This patch changes 24xx to use new register access, except for clock
framework. Clock framework register access will get updates in the
next patch.
Note that board-*.c files change GPMC (General Purpose Memory Controller)
access to use gpmc_cs_write_reg() instead of accessing the registers
directly. The code also uses gpmc_fck instead of it's parent clock
core_l3_ck for GPMC clock.
The H4 board file also adds h4_init_flash() function, which specify the
flash start and end addresses.
Also note that sleep.S removes some unused registers addresses.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/prcm.c')
-rw-r--r-- | arch/arm/mach-omap2/prcm.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 90f530540c65..b12f423b8595 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -17,19 +17,27 @@ #include <linux/init.h> #include <linux/clk.h> -#include "prcm-regs.h" +#include <asm/io.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; + + if (cpu_is_omap24xx()) { + wkup = prm_read_mod_reg(WKUP_MOD, RM_RSTCTRL) | OMAP_RST_DPLL3; + prm_write_mod_reg(wkup, WKUP_MOD, RM_RSTCTRL); + } } |