From patchwork Wed Apr 30 21:31:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 344332 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 1383D14010A for ; Thu, 1 May 2014 07:32:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7A714BD1A; Wed, 30 Apr 2014 23:32:30 +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 7THlrI0+N9OL; Wed, 30 Apr 2014 23:32:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 140004B881; Wed, 30 Apr 2014 23:32:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 769F44BD08 for ; Wed, 30 Apr 2014 23:32:25 +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 BviwTdj+qMhT for ; Wed, 30 Apr 2014 23:32:19 +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 na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0237.outbound.protection.outlook.com [207.46.163.237]) by theia.denx.de (Postfix) with ESMTPS id AF9E14B881 for ; Wed, 30 Apr 2014 23:32:10 +0200 (CEST) Received: from BY2PR03CA028.namprd03.prod.outlook.com (10.242.234.149) by BY2PR03MB394.namprd03.prod.outlook.com (10.141.141.13) with Microsoft SMTP Server (TLS) id 15.0.929.12; Wed, 30 Apr 2014 21:31:56 +0000 Received: from BN1BFFO11FD051.protection.gbl (2a01:111:f400:7c10::1:169) by BY2PR03CA028.outlook.office365.com (2a01:111:e400:2c2c::21) with Microsoft SMTP Server (TLS) id 15.0.934.12 via Frontend Transport; Wed, 30 Apr 2014 21:31:56 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.1) by BN1BFFO11FD051.mail.protection.outlook.com (10.58.145.6) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Wed, 30 Apr 2014 21:31:55 +0000 Received: from oslab-l1.am.freescale.net ([10.214.83.220]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s3ULVqo5028899; Wed, 30 Apr 2014 14:31:53 -0700 From: York Sun To: Date: Wed, 30 Apr 2014 14:31:50 -0700 Message-ID: <1398893511-22085-1-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.1; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(428001)(189002)(199002)(87936001)(62966002)(74662001)(20776003)(88136002)(19580405001)(101416001)(89996001)(46102001)(87286001)(4396001)(92726001)(80022001)(83322001)(83072002)(31966008)(44976005)(99396002)(33646001)(85852003)(36756003)(50466002)(81542001)(86362001)(76482001)(74502001)(80976001)(19580395003)(79102001)(77096999)(77156001)(50226001)(81342001)(50986999)(77982001)(92566001)(48376002)(6806004)(47776003)(93916002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB394; H:tx30smr01.am.freescale.net; FPR:EFF4F797.AC3465AB.29566B56.AEF97EC5.201AE; MLV:sfv; PTR:gate-tx3.freescale.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0197AFBD92 Received-SPF: None (: freescale.com does not designate permitted sender hosts) X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, u-boot@lists.denx.de, York Sun Subject: [U-Boot] [Patch v2 1/2] common/board_f: Preserve global data for mpc85xx and mpc86xx 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 For powerpc SoCs (including mpc85xx, mpc86xx), global data is used for initializing LAWs, before calling function baord_inti_f(). This data should not be cleared later. Signed-off-by: York Sun --- Change log v2: Instead of adding back gd init for all PPC, preserve gd for mpc85xx and mpc86xx. Note, need other maintainers to fix 83xx, 5xxx, 512x as I don't have boards to verify. common/board_f.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index cbdf06f..eebb377 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -970,7 +970,11 @@ static init_fnc_t init_sequence_f[] = { void board_init_f(ulong boot_flags) { -#ifndef CONFIG_X86 + /* + * For MPC85xx, global data is initialized in cpu_init_early_f() and + * used for init_law(). gd should not be cleared in this function. + */ +#if !defined(CONFIG_X86) && !defined(CONFIG_MPC85xx) && !defined(CONFIG_MPC86xx) gd_t data; gd = &data;