]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mxs: Add function to ungate the power block on MX23
authorMarek Vasut <marex@denx.de>
Fri, 11 Jan 2013 03:19:17 +0000 (03:19 +0000)
committerStefano Babic <sbabic@denx.de>
Mon, 21 Jan 2013 11:05:22 +0000 (12:05 +0100)
The power block on MX23 must first be ungated before it can be operated.
Add function to MXS power init that ungates it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c

index be44c22976352fdfec2e193acd6d8402b12484c0..e9d6302b7a7af2a0c8ad4e12b366fb582e6bc037 100644 (file)
@@ -881,11 +881,23 @@ static void mxs_setup_batt_detect(void)
        early_delay(10);
 }
 
+static void mxs_ungate_power(void)
+{
+#ifdef CONFIG_MX23
+       struct mxs_power_regs *power_regs =
+               (struct mxs_power_regs *)MXS_POWER_BASE;
+
+       writel(POWER_CTRL_CLKGATE, &power_regs->hw_power_ctrl_clr);
+#endif
+}
+
 void mxs_power_init(void)
 {
        struct mxs_power_regs *power_regs =
                (struct mxs_power_regs *)MXS_POWER_BASE;
 
+       mxs_ungate_power();
+
        mxs_power_clock2xtal();
        mxs_power_clear_auto_restart();
        mxs_power_set_linreg();