From patchwork Mon Apr 2 21:19:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 150253 X-Patchwork-Delegate: albert.aribaud@free.fr 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 7C360B6FBB for ; Tue, 3 Apr 2012 07:20:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDCD7280DE; Mon, 2 Apr 2012 23:20:16 +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 4U-kW2dRdnq4; Mon, 2 Apr 2012 23:20:16 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9FFA9280E7; Mon, 2 Apr 2012 23:20:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A946280E7 for ; Mon, 2 Apr 2012 23:20: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 EW18MG2OrAwd for ; Mon, 2 Apr 2012 23:20: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 va3outboundpool.messaging.microsoft.com (va3ehsobe002.messaging.microsoft.com [216.32.180.12]) by theia.denx.de (Postfix) with ESMTPS id 3A9C4280DE for ; Mon, 2 Apr 2012 23:20:06 +0200 (CEST) Received: from mail163-va3-R.bigfish.com (10.7.14.245) by VA3EHSOBE004.bigfish.com (10.7.40.24) with Microsoft SMTP Server id 14.1.225.23; Mon, 2 Apr 2012 21:20:05 +0000 Received: from mail163-va3 (localhost [127.0.0.1]) by mail163-va3-R.bigfish.com (Postfix) with ESMTP id 34D783801ED; Mon, 2 Apr 2012 21:20:05 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail163-va3 (localhost.localdomain [127.0.0.1]) by mail163-va3 (MessageSwitch) id 1333401603114874_15782; Mon, 2 Apr 2012 21:20:03 +0000 (UTC) Received: from VA3EHSMHS025.bigfish.com (unknown [10.7.14.238]) by mail163-va3.bigfish.com (Postfix) with ESMTP id 14B1310006F; Mon, 2 Apr 2012 21:20:03 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS025.bigfish.com (10.7.99.35) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 2 Apr 2012 21:19:58 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.1.355.3; Mon, 2 Apr 2012 16:19:57 -0500 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.240.143]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q32LJkYb027447; Mon, 2 Apr 2012 14:19:50 -0700 From: Fabio Estevam To: Date: Mon, 2 Apr 2012 18:19:45 -0300 Message-ID: <1333401586-24032-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: marex@denx.de, Fabio@theia.denx.de, Estevam Subject: [U-Boot] [PATCH 1/2] ARM: introduce arch_early_init_r() 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Introduce arch_early_init_r() function, which can be useful for doing early initialization after relocation has happened. Signed-off-by: Fabio Estevam --- arch/arm/include/asm/u-boot-arm.h | 1 + arch/arm/lib/board.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index 4ca75f9..9f3cae5 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -52,6 +52,7 @@ void cpu_init_cp15(void); /* cpu/.../arch/cpu.c */ int arch_cpu_init(void); int arch_misc_init(void); +int arch_early_init_r(void); /* board/.../... */ int board_init(void); diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 5270c11..025d6ca 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -500,6 +500,10 @@ void board_init_r(gd_t *id, ulong dest_addr) malloc_start = dest_addr - TOTAL_MALLOC_LEN; mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN); +#ifdef CONFIG_ARCH_EARLY_INIT_R + arch_early_init_r(); +#endif + #if !defined(CONFIG_SYS_NO_FLASH) puts("Flash: ");