From patchwork Tue Oct 30 16:57:00 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: 195542 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 6F5F52C008C for ; Wed, 31 Oct 2012 03:59:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D207E4A24A; Tue, 30 Oct 2012 17:58:59 +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 4kCCEeUosDwH; Tue, 30 Oct 2012 17:58:59 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E9C944A24F; Tue, 30 Oct 2012 17:58:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E11154A246 for ; Tue, 30 Oct 2012 17:58:24 +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 8hWfpLIKM6Lo for ; Tue, 30 Oct 2012 17:58:23 +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 AB4934A22A for ; Tue, 30 Oct 2012 17:57:56 +0100 (CET) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCP00E6JTRI7J70@mailout2.samsung.com> for u-boot@lists.denx.de; Wed, 31 Oct 2012 01:57:52 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-71-509007103723 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 62.C2.12699.01700905; Wed, 31 Oct 2012 01:57:52 +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 <0MCP009BOTRPFA00@mmp2.samsung.com> for u-boot@lists.denx.de; Wed, 31 Oct 2012 01:57:52 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Tue, 30 Oct 2012 17:57:00 +0100 Message-id: <1351616239-21079-6-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1351616239-21079-1-git-send-email-l.majewski@samsung.com> References: <1351616239-21079-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jQV0B9gkBBtPbDC3e7u1kd2D0OHtn B2MAYxSXTUpqTmZZapG+XQJXxqL935kLzvNUtH1ZzNbAeICri5GTQ0LARGJzwwsmCFtM4sK9 9WxdjFwcQgLTGSWOn/rHCuEsZpKY/3MxG0gVm4CexOe7T8E6RAQkJH71X2UEKWIW2MEo0Xzy LFiRsEC0xPlJa9hBbBYBVYkTK3vAGngF3CRW7njICrFOXuLp/T6geg4OTgF3iW2r80HCQkAl r79fY5/AyLuAkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRrDXn0nvYFzVYHGIUYCDUYmH 1+Bff4AQa2JZcWXuIUYJDmYlEd4lv4FCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeZs9UgKEBNIT S1KzU1MLUotgskwcnFINjEK5azqOLmFYwb0kZ7qOifcTFccsd7YPeee046L3nV/v6FK3QVZ+ cfcPJZNfrJLtJce7fjnHc+zvNN9r+v7Dn8sulV6sm561TAmy0J0n4VGQz1mtpr/dRj1e9PbL B7NZI5eXb7Pre93DHdL57L/liVWz3D4tXvxa7X9OpqhLYY2oTMz2P5+2KrEUZyQaajEXFScC ACC9wwH2AQAA Cc: Tom Rini , Kyungmin Park Subject: [U-Boot] [PATCH v4 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 Changes for v4: - 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: ");