From patchwork Fri Nov 16 21:20:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199790 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 072ED2C0089 for ; Sat, 17 Nov 2012 08:38:07 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73D674A4DB; Fri, 16 Nov 2012 22:36:35 +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 U5Xo8EBqXGKB; Fri, 16 Nov 2012 22:36:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8FF694A291; Fri, 16 Nov 2012 22:31:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E79AA4A185 for ; Fri, 16 Nov 2012 22:29:42 +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 UeQeyLaKdTFP for ; Fri, 16 Nov 2012 22:29:42 +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-ye0-f202.google.com (mail-ye0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 0692D4A187 for ; Fri, 16 Nov 2012 22:28:58 +0100 (CET) Received: by mail-ye0-f202.google.com with SMTP id r11so352402yen.3 for ; Fri, 16 Nov 2012 13:28:58 -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=+JbPAhiIbpO1uznT/JDRqvyE5j1QCuNkH+bASWufPE0=; b=FHv0sHisBLmJh266le5NAoqgDko0eQQTxOC6KG0LY5qRU7b/zIKGJgiGlt1B5fxMt7 6kxFEfabl4ZWKn37+cje3zSlEmJYhGJUJlH4WQOI1+rx6wLRavVgMfxoPZDBr4q9Jppq iFlFKa9tu8o7gyh4ZFSy55+0sIYY2xRa4W1uYmTz6FQPJZHMEZVD8dkhvdDPd6YPqlpX 2Bjq908LB8x0P9Hwx7vsaXlvAMtdIbMuzKPFAzpRuTwl+MibfAbsfLTXquKIucXyLutK FLKZZx8fcFEuYckcRIsrSWSVucu2ZvtWdkhZkwTPznz30UyzK0BBUIgVffmru69peqa0 gU6w== Received: by 10.101.176.10 with SMTP id d10mr1037813anp.12.1353101332792; Fri, 16 Nov 2012 13:28:52 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id i7si211061yhj.6.2012.11.16.13.28.49 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 16 Nov 2012 13:28:49 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 82666100047; Fri, 16 Nov 2012 13:28:49 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 60884160097; Fri, 16 Nov 2012 13:28:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 16 Nov 2012 13:20:07 -0800 Message-Id: <1353100842-20126-23-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1353100842-20126-1-git-send-email-sjg@chromium.org> References: <1353100842-20126-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkG8ksKy1r6l/gD+ihXotYxLZ1cDbFD1Vvoak23BU3Fp2CgWLK3Fbxtb2nYadErhrbjl6jGuDUPX+8H7yvjF1tFrxuED4V3GzxtY2nxVl0UV6ybv/WJVb72DxOEElkJSB7RpdfW9toaJpt2mWLjf0CZoPLqqxvdyKVFHLK+k3pNkLtAgJJwucZVdQ0OPTplbeCPpxU7 Cc: Kim Phillips , Kumar Gala , Andy Fleming , Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH 22/57] ppc: Move used_tlb_cams 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 --- arch/powerpc/cpu/mpc85xx/tlb.c | 8 ++++---- arch/powerpc/include/asm/global_data.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index a548dec..bee8fc5 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -99,7 +99,7 @@ static inline void use_tlb_cam(u8 idx) int i = idx / 32; int bit = idx % 32; - gd->used_tlb_cams[i] |= (1 << bit); + gd->arch.used_tlb_cams[i] |= (1 << bit); } static inline void free_tlb_cam(u8 idx) @@ -107,7 +107,7 @@ static inline void free_tlb_cam(u8 idx) int i = idx / 32; int bit = idx % 32; - gd->used_tlb_cams[i] &= ~(1 << bit); + gd->arch.used_tlb_cams[i] &= ~(1 << bit); } void init_used_tlb_cams(void) @@ -116,7 +116,7 @@ void init_used_tlb_cams(void) unsigned int num_cam = mfspr(SPRN_TLB1CFG) & 0xfff; for (i = 0; i < ((CONFIG_SYS_NUM_TLBCAMS+31)/32); i++) - gd->used_tlb_cams[i] = 0; + gd->arch.used_tlb_cams[i] = 0; /* walk all the entries */ for (i = 0; i < num_cam; i++) { @@ -133,7 +133,7 @@ int find_free_tlbcam(void) u32 idx; for (i = 0; i < ((CONFIG_SYS_NUM_TLBCAMS+31)/32); i++) { - idx = ffz(gd->used_tlb_cams[i]); + idx = ffz(gd->arch.used_tlb_cams[i]); if (idx != 32) break; diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index c7ce7fd..ca36ca3 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -91,6 +91,9 @@ struct arch_global_data { #if defined(CONFIG_FSL_LAW) u32 used_laws; #endif +#if defined(CONFIG_E500) + u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32]; +#endif }; /* @@ -113,9 +116,6 @@ typedef struct global_data { #if defined(CONFIG_FSL_ESDHC) u32 sdhc_clk; #endif -#if defined(CONFIG_E500) - u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32]; -#endif #if defined(CONFIG_MPC5xxx) unsigned long ipb_clk; #endif