summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorHector Palacios <hector.palacios@digi.com>2013-07-24 16:01:39 +0200
committerStefano Babic <sbabic@denx.de>2013-08-31 17:50:38 +0200
commit6f6059e0f102809bcba1ea3b7d500c3e4f5f9581 (patch)
treef63e2f2fda0b01066eb6398c34425b7c89085555 /arch/arm
parent518501da4c9d05e6ac87908fbad79d8e10e4b0e4 (diff)
downloadtalos-obmc-uboot-6f6059e0f102809bcba1ea3b7d500c3e4f5f9581.tar.gz
talos-obmc-uboot-6f6059e0f102809bcba1ea3b7d500c3e4f5f9581.zip
ARM: mxs: rename function that sets AUTO_RESTART flag
The AUTO_RESTART flag of HW_RTC_PERSISTENT0 register will power up the chip automatically 180ms after power down. This bit must be enabled by the boot loader to ensure the target can start upon hardware reset or watchdog reset even when powered from a battery. Currently the function named 'mxs_power_clear_auto_restart()' is setting this flag although the 'clear' in its name suggest the opposite. This patch renames the function to 'mxs_power_set_auto_restart()' and removes the comment about EVK revision A which was confusing because the function indeed was setting the flag. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_power_init.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index e3b6cd95f9..f357959059 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -36,7 +36,7 @@ static void mxs_power_clock2pll(void)
CLKCTRL_CLKSEQ_BYPASS_CPU);
}
-static void mxs_power_clear_auto_restart(void)
+static void mxs_power_set_auto_restart(void)
{
struct mxs_rtc_regs *rtc_regs =
(struct mxs_rtc_regs *)MXS_RTC_BASE;
@@ -49,10 +49,7 @@ static void mxs_power_clear_auto_restart(void)
while (readl(&rtc_regs->hw_rtc_ctrl) & RTC_CTRL_CLKGATE)
;
- /*
- * Due to the hardware design bug of mx28 EVK-A
- * we need to set the AUTO_RESTART bit.
- */
+ /* Do nothing if flag already set */
if (readl(&rtc_regs->hw_rtc_persistent0) & RTC_PERSISTENT0_AUTO_RESTART)
return;
@@ -911,7 +908,7 @@ void mxs_power_init(void)
mxs_ungate_power();
mxs_power_clock2xtal();
- mxs_power_clear_auto_restart();
+ mxs_power_set_auto_restart();
mxs_power_set_linreg();
mxs_power_setup_5v_detect();
OpenPOWER on IntegriCloud