diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-08-11 05:13:54 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-09-03 17:22:19 -0400 |
commit | 4ca86a2ff37ce92b6875a184a97a20188704cb6c (patch) | |
tree | bb9b5608a7031cd64a5f24dfcd1abdebaf44507e /arch/mips/netlogic | |
parent | 13314a91f0588546023570cfc9a1cf4ca5027c75 (diff) |
MIPS: Netlogic: Add support for XLP2XX
XLP2XX is first in the series of 28nm XLPII processors.
The changes are to:
* Add processor ID for XLP2XX to asm/cpu.h and kernel/cpu-probe.c.
* Add a cpu_is_xlpii() function to check for XLPII processors.
* Update xlp_mmu_init() to use config4 to enable extended TLB.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5698/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic')
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 7718368e4598..76a7131e486e 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
@@ -110,7 +110,12 @@ void __init plat_mem_setup(void) | |||
110 | 110 | ||
111 | const char *get_system_type(void) | 111 | const char *get_system_type(void) |
112 | { | 112 | { |
113 | return "Netlogic XLP Series"; | 113 | switch (read_c0_prid() & 0xff00) { |
114 | case PRID_IMP_NETLOGIC_XLP2XX: | ||
115 | return "Broadcom XLPII Series"; | ||
116 | default: | ||
117 | return "Netlogic XLP Series"; | ||
118 | } | ||
114 | } | 119 | } |
115 | 120 | ||
116 | void __init prom_free_prom_memory(void) | 121 | void __init prom_free_prom_memory(void) |
@@ -120,12 +125,20 @@ void __init prom_free_prom_memory(void) | |||
120 | 125 | ||
121 | void xlp_mmu_init(void) | 126 | void xlp_mmu_init(void) |
122 | { | 127 | { |
123 | /* enable extended TLB and Large Fixed TLB */ | 128 | u32 conf4; |
124 | write_c0_config6(read_c0_config6() | 0x24); | 129 | |
125 | 130 | if (cpu_is_xlpii()) { | |
126 | /* set page mask of Fixed TLB in config7 */ | 131 | /* XLPII series has extended pagesize in config 4 */ |
127 | write_c0_config7(PM_DEFAULT_MASK >> | 132 | conf4 = read_c0_config4() & ~0x1f00u; |
128 | (13 + (ffz(PM_DEFAULT_MASK >> 13) / 2))); | 133 | write_c0_config4(conf4 | ((PAGE_SHIFT - 10) / 2 << 8)); |
134 | } else { | ||
135 | /* enable extended TLB and Large Fixed TLB */ | ||
136 | write_c0_config6(read_c0_config6() | 0x24); | ||
137 | |||
138 | /* set page mask of extended Fixed TLB in config7 */ | ||
139 | write_c0_config7(PM_DEFAULT_MASK >> | ||
140 | (13 + (ffz(PM_DEFAULT_MASK >> 13) / 2))); | ||
141 | } | ||
129 | } | 142 | } |
130 | 143 | ||
131 | void nlm_percpu_init(int hwcpuid) | 144 | void nlm_percpu_init(int hwcpuid) |