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

Lukasz Majewski l.majewski at samsung.com
Fri Oct 5 10:16:27 CEST 2012


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 at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
Changes for v2:
- None
---
 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 109a1ac..431ef5b 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -513,6 +513,10 @@ void board_init_r(gd_t *id, ulong dest_addr)
 	arch_early_init_r();
 #endif
 
+#ifdef CONFIG_POWER_INIT
+	power_board_init();
+#endif
+
 #if !defined(CONFIG_SYS_NO_FLASH)
 	puts("Flash: ");
 
diff --git a/include/common.h b/include/common.h
index a7fb05e..5cc859f 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);
+#ifdef CONFIG_POWER_INIT
+int power_board_init(void);
+#endif
 
 #if defined(CONFIG_SYS_DRAM_TEST)
 int testdram(void);
-- 
1.7.2.3



More information about the U-Boot mailing list