From patchwork Tue Nov 13 13:21:56 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: 198649 X-Patchwork-Delegate: agust@denx.de 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 378CD2C00D6 for ; Wed, 14 Nov 2012 00:23:56 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11C334A130; Tue, 13 Nov 2012 14:23:54 +0100 (CET) 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 utxUWVL4Libm; Tue, 13 Nov 2012 14:23:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C0CD4A165; Tue, 13 Nov 2012 14:23:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EBA974A149 for ; Tue, 13 Nov 2012 14:23:19 +0100 (CET) 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 udZKv9zrgX-W for ; Tue, 13 Nov 2012 14:23:18 +0100 (CET) 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 mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 611834A165 for ; Tue, 13 Nov 2012 14:22:52 +0100 (CET) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDF005X7H5HJYA0@mailout2.samsung.com> for u-boot@lists.denx.de; Tue, 13 Nov 2012 22:22:48 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-05-50a249a8d9b6 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 8F.A3.01231.8A942A05; Tue, 13 Nov 2012 22:22:48 +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 <0MDF00AK5H593U10@mmp1.samsung.com> for u-boot@lists.denx.de; Tue, 13 Nov 2012 22:22:48 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Tue, 13 Nov 2012 14:21:56 +0100 Message-id: <1352812937-15998-6-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1352812937-15998-1-git-send-email-l.majewski@samsung.com> References: <1352812937-15998-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd0VnosCDH7OUrB4u7eT3YHR4+yd HYwBjFFcNimpOZllqUX6dglcGQsO3WApmMZbseFgN1MD4zeuLkZODgkBE4nr876yQthiEhfu rWfrYuTiEBJYxCjxam0PC4SzmEnixprvLCBVbAJ6Ep/vPmUCsUUEJCR+9V9lBCliFrjDKPH/ 2guwhLBAtMS/xn9gNouAqsTSlYvAbF4BN4lzWw+zQayTl3h6vw/I5uDgFHCX+HMerEQIqGTz zqPMExh5FzAyrGIUTS1ILihOSs811CtOzC0uzUvXS87P3cQI9vozqR2MKxssDjEKcDAq8fDe cFkYIMSaWFZcmXuIUYKDWUmE97zbogAh3pTEyqrUovz4otKc1OJDjNIcLErivM0eKQFCAumJ JanZqakFqUUwWSYOTqkGxtB/i3QfFYhOrsrku/xk9iTJ/6JCJ7YU8Po82yZt/cQvUcudyeLC dcmg+BuBlzs+lplPKpddUiH6/KHVp2Pn/2yz6jJ4paz8VXbrrMDwYxvsAo/Wbs5rnL6CvaH7 bIfu391rrycebg897x03ZdLq+q+/jHi07FtVag7bldssWG17w19Tz3DBTyWW4oxEQy3mouJE ALqjs3f2AQAA Cc: Kyungmin Park , Tom Rini Subject: [U-Boot] [PATCH v7 05/26] 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 Changes for v4: - None Changes for v5: - None Changes for v6: - None Changes for v7: - None --- 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 92cad9a..22a4d9c 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -224,6 +224,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 */ @@ -525,6 +532,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: ");