From patchwork Fri Oct 19 15:43:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 192746 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9524F2C0080 for ; Sat, 20 Oct 2012 02:45:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6E144A4D1; Fri, 19 Oct 2012 17:45:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r6-cl9EJk1GK; Fri, 19 Oct 2012 17:45:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C7274A4D0; Fri, 19 Oct 2012 17:45:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 548124A4D2 for ; Fri, 19 Oct 2012 17:45:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uPJY7tj6qEpV for ; Fri, 19 Oct 2012 17:45:08 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by theia.denx.de (Postfix) with ESMTP id 69B594A4D1 for ; Fri, 19 Oct 2012 17:44:53 +0200 (CEST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MC500H4PD28WN00@mailout3.samsung.com> for u-boot@lists.denx.de; Sat, 20 Oct 2012 00:44:52 +0900 (KST) X-AuditID: cbfee61a-b7f976d000001eb9-87-5081757427d4 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DA.C4.07865.47571805; Sat, 20 Oct 2012 00:44:52 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MC500FFND1YC320@mmp1.samsung.com> for u-boot@lists.denx.de; Sat, 20 Oct 2012 00:44:52 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 19 Oct 2012 17:43:52 +0200 Message-id: <1350661451-1273-6-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> References: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jAd2S0sYAg09/eS3e7u1kd2D0OHtn B2MAYxSXTUpqTmZZapG+XQJXxquj15gKtvBUTPx8nrWBcR1XFyMnh4SAicTevd+YIWwxiQv3 1rN1MXJxCAksYpRYPuUfK4SzmEni45Q17CBVbAJ6Ep/vPmUCsUUEJCR+9V9lBCliFnjAKPGl aSVQgoNDWCBa4tx1RZAaFgFViZOth8E28Aq4SpxqmsQOsU1e4un9PjaQck4BN4lXv8tBwkJA JRea77JMYORdwMiwilE0tSC5oDgpPddQrzgxt7g0L10vOT93EyPY58+kdjCubLA4xCjAwajE w/vrdkOAEGtiWXFl7iFGCQ5mJRFeN/bGACHelMTKqtSi/Pii0pzU4kOM0hwsSuK8zR4pAUIC 6YklqdmpqQWpRTBZJg5OqQbGudNvPOVvO8t/1q9P/RRHyszU4v03VnAHdErHvvq6JORcMUNI ad5Jn7wTXFtepb6a5fmkYNuZk1MsmtkncyYy1BiqVOjrOhyMOPnnzjH5lJR9m3OWc9nFJzqG n57L/MZMe8tCoTV6jD5Wyf7F6/O/M5a7yKb05ukxz7xTPDtmU/vjGeaytp+UWIozEg21mIuK EwEJmPvK9QEAAA== Cc: Jaehoon Chung , Kyungmin Park , Tom Rini Subject: [U-Boot] [PATCH v3 05/24] pmic: Introduce power_init_board() method at ./lib/board.c file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@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: ");