From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Fri, 19 Oct 2012 17:43:52 +0200 Subject: [U-Boot] [PATCH v3 05/24] pmic: Introduce power_init_board() method at ./lib/board.c file In-Reply-To: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> References: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> Message-ID: <1350661451-1273-6-git-send-email-l.majewski@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de It is necessary to introduce a new system wide function- power_init_board() 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 power_init_board function is a weak function with default implementation. Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park --- Changes for v2: - None Changes for v3: - rename power_board_init to power_init_board - power_init_board() defined as __weak function with default implementation - CONFIG_POWER_INIT flag removed since it is not needed --- arch/arm/lib/board.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 109a1ac..5310ca4 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -231,6 +231,13 @@ int __arch_cpu_init(void) int arch_cpu_init(void) __attribute__((weak, alias("__arch_cpu_init"))); +int __power_init_board(void) +{ + return 0; +} +int power_init_board(void) + __attribute__((weak, alias("__power_init_board"))); + init_fnc_t *init_sequence[] = { arch_cpu_init, /* basic arch cpu dependent setup */ @@ -512,6 +519,7 @@ void board_init_r(gd_t *id, ulong dest_addr) #ifdef CONFIG_ARCH_EARLY_INIT_R arch_early_init_r(); #endif + power_init_board(); #if !defined(CONFIG_SYS_NO_FLASH) puts("Flash: "); -- 1.7.2.3