From patchwork Fri Dec 14 06:48:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206312 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 0394A2C008E for ; Fri, 14 Dec 2012 17:56:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9FC484A2B0; Fri, 14 Dec 2012 07:56:36 +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 Zai-EmqavP6I; Fri, 14 Dec 2012 07:56:36 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D18804A173; Fri, 14 Dec 2012 07:55:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 32C2B4A122 for ; Fri, 14 Dec 2012 07:51:20 +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 r6TbkMj8WpFZ for ; Fri, 14 Dec 2012 07:51:17 +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 mail-wg0-f74.google.com (mail-wg0-f74.google.com [74.125.82.74]) by theia.denx.de (Postfix) with ESMTPS id 72C8F4A13E for ; Fri, 14 Dec 2012 07:50:23 +0100 (CET) Received: by mail-wg0-f74.google.com with SMTP id dt14so155709wgb.3 for ; Thu, 13 Dec 2012 22:50:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=AnQKmGdyCYpr0p+1f2063dU6RV4zjX2KM98uVT11x9M=; b=XaOE5w2Meg7M00T0l27BgBppWRlL1O+JlNFfUxK5MZZTTCmANLd2j4Cm9/nM3FoxLi 6HP+Z6P2E5fTfWrfbgtncOOxzRwmZn7+SephfYV3lcHGNkHdIBD6ZCeWc3+52Wf9gQJ8 ZlwKnnUriUQdo8O4a/lrxr+ou1b+uIsrYq5cP/5D3AtEPL2OUksJ5iRqhGK3tMqEsTvr acgN6Nz9AqGB3YriQ8tYQnGA3xI6qyTzsi+4IjPS2SLtnrYlKB4sjEeNV2sLxPj2dg73 EIwCoFGyu1/MfjTJMCvp5nv/J3qvC0Szdp+9UjLY56ue6hAfOtZ6r4lq/ILsMby+HbJw tUew== Received: by 10.14.214.197 with SMTP id c45mr4606035eep.7.1355467821972; Thu, 13 Dec 2012 22:50:21 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z44si963824een.0.2012.12.13.22.50.21 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:21 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 5DAE420005C; Thu, 13 Dec 2012 22:50:21 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 1C3551608F3; Thu, 13 Dec 2012 22:50:21 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:48:56 -0800 Message-Id: <1355467767-29575-28-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1355467767-29575-1-git-send-email-sjg@chromium.org> References: <1355467767-29575-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQnwRlsYzw6wpfCxU4wETkQ5suaXhGz9VAFSdw35h+GW428g/RvDR0VnSZAlAVvS8K5Xid/DBiRCoN+36Gxs8XG4VAb2jlwa8YGNpbP0Jn2TYwDjrOEKFyRDTbX8bZFDwi1Eb3t7Fm6nUsBYBGmIuGVkYdnxZ71MY79JbVYsdZ/eDSYZN4WxVuAOZBiTuoVTU4KghRQO Cc: Kim Phillips , Kumar Gala , Andy Fleming , Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH v2 27/58] ppc: Move reset_status to arch_global_data 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 Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- Changes in v2: None arch/powerpc/cpu/mpc512x/cpu.c | 2 +- arch/powerpc/cpu/mpc512x/cpu_init.c | 2 +- arch/powerpc/cpu/mpc8260/cpu_init.c | 4 ++-- arch/powerpc/cpu/mpc83xx/cpu_init.c | 4 ++-- arch/powerpc/include/asm/global_data.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/cpu/mpc512x/cpu.c b/arch/powerpc/cpu/mpc512x/cpu.c index 641120f..bb03c6d 100644 --- a/arch/powerpc/cpu/mpc512x/cpu.c +++ b/arch/powerpc/cpu/mpc512x/cpu.c @@ -69,7 +69,7 @@ int checkcpu (void) printf ("at %s MHz, CSB at %s MHz (RSR=0x%04lx)\n", strmhz(buf1, clock), strmhz(buf2, gd->arch.csb_clk), - gd->reset_status & 0xffff); + gd->arch.reset_status & 0xffff); return 0; } diff --git a/arch/powerpc/cpu/mpc512x/cpu_init.c b/arch/powerpc/cpu/mpc512x/cpu_init.c index fe6beaf..32ade1b 100644 --- a/arch/powerpc/cpu/mpc512x/cpu_init.c +++ b/arch/powerpc/cpu/mpc512x/cpu_init.c @@ -62,7 +62,7 @@ void cpu_init_f (volatile immap_t * im) #endif /* RSR - Reset Status Register - clear all status */ - gd->reset_status = im->reset.rsr; + gd->arch.reset_status = im->reset.rsr; out_be32(&im->reset.rsr, ~RSR_RES); /* diff --git a/arch/powerpc/cpu/mpc8260/cpu_init.c b/arch/powerpc/cpu/mpc8260/cpu_init.c index acd48a9..3964e60 100644 --- a/arch/powerpc/cpu/mpc8260/cpu_init.c +++ b/arch/powerpc/cpu/mpc8260/cpu_init.c @@ -120,7 +120,7 @@ void cpu_init_f (volatile immap_t * immr) memset ((void *) gd, 0, sizeof (gd_t)); /* RSR - Reset Status Register - clear all status (5-4) */ - gd->reset_status = immr->im_clkrst.car_rsr; + gd->arch.reset_status = immr->im_clkrst.car_rsr; immr->im_clkrst.car_rsr = RSR_ALLBITS; /* RMR - Reset Mode Register - contains checkstop reset enable (5-5) */ @@ -274,7 +274,7 @@ int prt_8260_rsr (void) RSR_EHRS, "External Hard"} }; static int n = sizeof bits / sizeof bits[0]; - ulong rsr = gd->reset_status; + ulong rsr = gd->arch.reset_status; int i; char *sep; diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c index 20d0600..9325110 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c @@ -232,7 +232,7 @@ void cpu_init_f (volatile immap_t * im) clrsetbits_be32(&im->clk.sccr, sccr_mask, sccr_val); /* RSR - Reset Status Register - clear all status (4.6.1.3) */ - gd->reset_status = __raw_readl(&im->reset.rsr); + gd->arch.reset_status = __raw_readl(&im->reset.rsr); __raw_writel(~(RSR_RES), &im->reset.rsr); /* AER - Arbiter Event Register - store status */ @@ -499,7 +499,7 @@ int prt_83xx_rsr(void) RSR_HRS, "External/Internal Hard"} }; static int n = sizeof bits / sizeof bits[0]; - ulong rsr = gd->reset_status; + ulong rsr = gd->arch.reset_status; int i; char *sep; diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 656117b..136b918 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -107,6 +107,7 @@ struct arch_global_data { unsigned long pev_clk; unsigned long flb_clk; #endif + unsigned long reset_status; /* reset status register at boot */ }; /* @@ -130,7 +131,6 @@ typedef struct global_data { u32 sdhc_clk; #endif phys_size_t ram_size; /* RAM size */ - unsigned long reset_status; /* reset status register at boot */ #if defined(CONFIG_MPC83xx) unsigned long arbiter_event_attributes; unsigned long arbiter_event_address;