diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:48:52 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:05:43 -0500 |
commit | 7c80c6c51ab39b4509b4ca79035490eabab0af86 (patch) | |
tree | 1dc37ac4de89da9788daf991e81f0a58ba77772e /arch | |
parent | 8670dbc95361340c3082b62abbbbb3d1ffbb89cb (diff) | |
download | talos-obmc-uboot-7c80c6c51ab39b4509b4ca79035490eabab0af86.tar.gz talos-obmc-uboot-7c80c6c51ab39b4509b4ca79035490eabab0af86.zip |
ppc: Move used_tlb_cams to arch_global_data
Move this field into arch_global_data and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/tlb.c | 8 | ||||
-rw-r--r-- | 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 23d33574a0..0dff37f77c 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 c7ce7fdca0..ca36ca3332 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 |