From patchwork Tue Sep 23 05:27:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 392237 X-Patchwork-Delegate: yorksun@freescale.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 EE8BC14009E for ; Tue, 23 Sep 2014 15:43:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 14CE1A73EA; Tue, 23 Sep 2014 07:43: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 Ia8bdqJO+3WI; Tue, 23 Sep 2014 07:43:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 97AAAA73F9; Tue, 23 Sep 2014 07:43:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E558A73F9 for ; Tue, 23 Sep 2014 07:43:23 +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 hxsqcru2llvc for ; Tue, 23 Sep 2014 07:43:20 +0200 (CEST) X-Greylist: delayed 946 seconds by postgrey-1.27 at theia; Tue, 23 Sep 2014 07:43:16 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-bn1-obe.outbound.protection.outlook.com (mail-bn1on0143.outbound.protection.outlook.com [157.56.110.143]) by theia.denx.de (Postfix) with ESMTPS id 18F9EA73EA for ; Tue, 23 Sep 2014 07:43:16 +0200 (CEST) Received: from DM2PR03CA0043.namprd03.prod.outlook.com (10.141.96.42) by BL2PR03MB450.namprd03.prod.outlook.com (10.141.92.15) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Tue, 23 Sep 2014 05:27:28 +0000 Received: from BY2FFO11FD040.protection.gbl (2a01:111:f400:7c0c::158) by DM2PR03CA0043.outlook.office365.com (2a01:111:e400:2428::42) with Microsoft SMTP Server (TLS) id 15.0.1024.12 via Frontend Transport; Tue, 23 Sep 2014 05:27:27 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD040.mail.protection.outlook.com (10.1.14.225) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 23 Sep 2014 05:27:27 +0000 Received: from b32579-VirtualBox.ap.freescale.net (B32579-02-010232132108.ap.freescale.net [10.232.132.108]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s8N5RJ3g016083; Mon, 22 Sep 2014 22:27:25 -0700 From: Prabhakar Kushwaha To: Date: Tue, 23 Sep 2014 10:57:12 +0530 Message-ID: <1411450032-4676-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(95666004)(50226001)(93916002)(46102003)(83072002)(74502003)(90102001)(79102003)(89996001)(92566001)(2351001)(48376002)(107046002)(74662003)(87286001)(81542003)(50986999)(77982003)(31966008)(10300001)(86362001)(102836001)(62966002)(104166001)(97736003)(81342003)(99396002)(104016003)(85852003)(64706001)(106466001)(110136001)(20776003)(36756003)(83322001)(85306004)(4396001)(21056001)(229853001)(44976005)(84676001)(81156004)(87936001)(92726001)(47776003)(77156001)(76482002)(88136002)(68736004)(69596002)(120916001)(6806004)(50466002)(19580395003)(33646002)(80022003)(19580405001)(105606002); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB450; H:az84smr01.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB450; X-Forefront-PRVS: 0343AC1D30 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=prabhakar@freescale.com; X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, yorksun@freescale.com Subject: [U-Boot] [PATCH] powerpc/mpc85xx: Use IFC accessor function 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 IFC registers can be of type Little Endian or big Endian depending upon Freescale SoC. Here SoC defines the register type of IFC IP. So use IFC acessor functions instead of in_be32(). Signed-off-by: Prabhakar Kushwaha --- arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 6 +++--- arch/powerpc/cpu/mpc85xx/speed.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c index 47b712d..1f00e3c 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c @@ -70,9 +70,9 @@ void setup_ifc(void) #endif /* Change flash's physical address */ - out_be32(&(ifc_regs->cspr_cs[0].cspr), CONFIG_SYS_CSPR0); - out_be32(&(ifc_regs->csor_cs[0].csor), CONFIG_SYS_CSOR0); - out_be32(&(ifc_regs->amask_cs[0].amask), CONFIG_SYS_AMASK0); + ifc_out32(&(ifc_regs->cspr_cs[0].cspr), CONFIG_SYS_CSPR0); + ifc_out32(&(ifc_regs->csor_cs[0].csor), CONFIG_SYS_CSOR0); + ifc_out32(&(ifc_regs->amask_cs[0].amask), CONFIG_SYS_AMASK0); return ; } diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index 3236f6a..8426b1a 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -430,7 +430,7 @@ void get_sys_info(sys_info_t *sys_info) #endif #if defined(CONFIG_FSL_IFC) - ccr = in_be32(&ifc_regs->ifc_ccr); + ccr = ifc_in32(&ifc_regs->ifc_ccr); ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1; sys_info->freq_localbus = sys_info->freq_systembus / ccr;