diff options
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/config.h | 7 | ||||
-rw-r--r-- | include/asm-ppc/global_data.h | 3 | ||||
-rw-r--r-- | include/asm-ppc/mmu.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h index d5f82b4..796707e 100644 --- a/include/asm-ppc/config.h +++ b/include/asm-ppc/config.h @@ -63,6 +63,13 @@ #define CONFIG_TSECV2 #endif +/* Number of TLB CAM entries we have on FSL Book-E chips */ +#if defined(CONFIG_E500MC) +#define CONFIG_SYS_NUM_TLBCAMS 64 +#elif defined(CONFIG_E500) +#define CONFIG_SYS_NUM_TLBCAMS 16 +#endif + /* Relocation to SDRAM works on all PPC boards */ #define CONFIG_RELOC_FIXUP_WORKS diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h index 55e7e20..3f11918 100644 --- a/include/asm-ppc/global_data.h +++ b/include/asm-ppc/global_data.h @@ -107,6 +107,9 @@ typedef struct 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 #if defined(CONFIG_MPC5xxx) unsigned long ipb_clk; unsigned long pci_clk; diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h index ec22a50..fd10249 100644 --- a/include/asm-ppc/mmu.h +++ b/include/asm-ppc/mmu.h @@ -479,6 +479,8 @@ extern void disable_tlb(u8 esel); extern void invalidate_tlb(u8 tlb); extern void init_tlbs(void); extern int find_tlb_idx(void *addr, u8 tlbsel); +extern void init_used_tlb_cams(void); +extern int find_free_tlbcam(void); extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg); |