[PATCH 2/3] ARM i.MX51 babbage: move lowlevel setup after power init

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 23 06:36:18 EDT 2012


The imx51 lowlevel setup code currently sets the full cpu
speed only for TO3. It turned out that this is not a TO
specific hack but a hack for older babbage boards. Move
the lowlevel init after babbage_power_init() so that we
can remove the hack from the generic i.MX51 lowlevel
function. As this potentially changes the UART clock we
have to flush the console beforehand and call the clock
notifier afterwards.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/boards/freescale-mx51-pdk/board.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
index e515d94..108af93 100644
--- a/arch/arm/boards/freescale-mx51-pdk/board.c
+++ b/arch/arm/boards/freescale-mx51-pdk/board.c
@@ -30,6 +30,7 @@
 #include <fs.h>
 #include <fcntl.h>
 #include <nand.h>
+#include <notifier.h>
 #include <spi/spi.h>
 #include <mfd/mc13892.h>
 #include <io.h>
@@ -245,6 +246,10 @@ static int f3s_devices_init(void)
 
 	babbage_power_init();
 
+	console_flush();
+	imx51_init_lowlevel();
+	clock_notifier_call_chain();
+
 	armlinux_set_bootparams((void *)0x90000100);
 	armlinux_set_architecture(MACH_TYPE_MX51_BABBAGE);
 
@@ -266,8 +271,6 @@ static int f3s_console_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(f3s_pads, ARRAY_SIZE(f3s_pads));
 
-	imx51_init_lowlevel();
-
 	writel(0, 0x73fa8228);
 	writel(0, 0x73fa822c);
 	writel(0, 0x73fa8230);
-- 
1.7.9.1




More information about the barebox mailing list