]> git.sur5r.net Git - u-boot/commitdiff
mx53loco: Call PMIC related functions from board_late_init()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 26 Dec 2012 05:50:20 +0000 (05:50 +0000)
committerStefano Babic <sbabic@denx.de>
Thu, 27 Dec 2012 10:03:43 +0000 (11:03 +0100)
Since commit c733681 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) mx53loco fails to allocate the memory for PMIC:

U-Boot 2013.01-rc2-dirty (Dec 20 2012 - 15:55:01)

Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB
pmic_alloc: No available memory for allocation!
pmic_init: POWER allocation error!
CPU:   Freescale i.MX53 family rev2.0 at 800 MHz
Reset cause: POR
MMC:   FSL_SDHC: 0, FSL_SDHC: 1

Calling the PMIC related functions at a later stage, ie, from board_late_init()
fixes the issue.

Reported-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Stefano Babic <sbabic@denx.de>
board/freescale/mx53loco/mx53loco.c
include/configs/mx53loco.h

index 2c8cb7a1cc58d16bbacc7dd8376b59c76eba43be..63a4f8baf3fec93f659b4bc51feed2f12eb70cf2 100644 (file)
@@ -462,12 +462,18 @@ int board_init(void)
 
        mxc_set_sata_internal_clock();
        setup_iomux_i2c();
+
+       lcd_enable();
+
+       return 0;
+}
+
+int board_late_init(void)
+{
        if (!power_init())
                clock_1GHz();
        print_cpuinfo();
 
-       lcd_enable();
-
        return 0;
 }
 
index 4cfdc0b95872456001f0eaa41ef774aa3baed6a9..996396b99b65760bfc055d3d8c30aefe956a19e4 100644 (file)
@@ -39,6 +39,7 @@
 #define CONFIG_SYS_MALLOC_LEN          (10 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_LATE_INIT
 #define CONFIG_MXC_GPIO
 #define CONFIG_REVISION_TAG