[U-Boot,05/16] pmic: Introduce power_board_init() method at ./lib/board.c file

Message ID 1347637215-4830-6-git-send-email-l.majewski@samsung.com
State Superseded
Delegated to: Minkyu Kang
Headers show

Commit Message

Ɓukasz Majewski Sept. 14, 2012, 3:40 p.m.
It is necessary to introduce a new system wide function- power_board_init()

It turns out, that power initialization must be done as early as possible.
In the case of PMIC framework redesign, which aims to support multiple
instances of PMIC devices the initialization shall be performed just
after malloc configuration.

The arch_early_init_r() could be used instead, but it doesn't reflect
that the "power" subsystem is going to be initialized.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
 arch/arm/lib/board.c |    4 ++++
 include/common.h     |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index f1951e8..38d92fe 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -510,6 +510,10 @@  void board_init_r(gd_t *id, ulong dest_addr)
+	power_board_init();
 #if !defined(CONFIG_SYS_NO_FLASH)
 	puts("Flash: ");
diff --git a/include/common.h b/include/common.h
index 55025c0..62c8e9a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -487,6 +487,9 @@  int board_late_init (void);
 int board_postclk_init (void); /* after clocks/timebase, before env/serial */
 int board_early_init_r (void);
 void board_poweroff (void);
+int power_board_init(void);
 #if defined(CONFIG_SYS_DRAM_TEST)
 int testdram(void);