summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2013-01-11 03:19:17 +0000
committerStefano Babic <sbabic@denx.de>2013-01-21 12:05:22 +0100
commit7788bf067db6710dd5df76d420c7033087642173 (patch)
tree315544b1ab7b0508022d67bddcaaca05b7608708 /arch
parent1a3c5ffe4f060455a8121093dc82e005b632c9b4 (diff)
downloadu-boot-imx-7788bf067db6710dd5df76d420c7033087642173.zip
u-boot-imx-7788bf067db6710dd5df76d420c7033087642173.tar.gz
u-boot-imx-7788bf067db6710dd5df76d420c7033087642173.tar.bz2
mxs: Add function to ungate the power block on MX23
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_power_init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index be44c22..e9d6302 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -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();