From patchwork Fri Oct 5 08:16:27 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: 189431 X-Patchwork-Delegate: sbabic@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 347752C0327 for ; Fri, 5 Oct 2012 18:18:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3D90280DC; Fri, 5 Oct 2012 10:17:58 +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 an3gklLZ4GsR; Fri, 5 Oct 2012 10:17:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 188A0280A8; Fri, 5 Oct 2012 10:17:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4196F2809E for ; Fri, 5 Oct 2012 10:17:26 +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 cHLOry+FMETM for ; Fri, 5 Oct 2012 10:17:25 +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 mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id E12712808C for ; Fri, 5 Oct 2012 10:17:17 +0200 (CEST) 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 <0MBE00L3ZUXL89F0@mailout2.samsung.com> for u-boot@lists.denx.de; Fri, 05 Oct 2012 17:17:09 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-dd-506e9785ac5d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id BF.42.03783.5879E605; Fri, 05 Oct 2012 17:17:09 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MBE0068VUZYNY10@mmp2.samsung.com> for u-boot@lists.denx.de; Fri, 05 Oct 2012 17:17:09 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 05 Oct 2012 10:16:27 +0200 Message-id: <1349425003-32523-6-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1349425003-32523-1-git-send-email-l.majewski@samsung.com> References: <1349425003-32523-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jQd3W6XkBBg8f81u83dvJ7sDocfbO DsYAxigum5TUnMyy1CJ9uwSujGVbvrAUzOKpWP5kHVMD4xSuLkZODgkBE4mnjVtYIGwxiQv3 1rN1MXJxCAlMZ5RYdngdlLOYSWL+mUnsIFVsAnoSn+8+ZQKxRQQkJH71X2UEKWIW2MEo0Xzy LBtIQlggWuLUybdgRSwCqhLTbh5iBbF5BdwkDh14xgqxTl7i6f0+sHpOAXeJ7e+/MYPYQkA1 8x5cYpzAyLuAkWEVo2hqQXJBcVJ6rqFecWJucWleul5yfu4mRrDfn0ntYFzZYHGIUYCDUYmH N+FhboAQa2JZcWXuIUYJDmYlEd6rSXkBQrwpiZVVqUX58UWlOanFhxilOViUxHmbPVIChATS E0tSs1NTC1KLYLJMHJxSDYwpm45rcUXc+J8z3Tn+5k/lP1/rtl1lCJ6VP7HFocP8W2Og6cTr wXJJB/1kZFmDn7Ik3/zp5FZ1zkq72VEtTuaQvPHDvcxnnV0Xp55r+j536iNZNVM5zzqGhalb LSOXvYmNuznjtklVCO+aldWiHoxvbwgHvV1vc03SiTUnV+oHG4fUZpcji5RYijMSDbWYi4oT Aaa2s/f3AQAA Cc: Tom Rini , Kyungmin Park Subject: [U-Boot] [PATCH v2 05/21] pmic: Introduce power_board_init() 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_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 Signed-off-by: Kyungmin Park --- 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);