diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-01-22 11:19:40 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 18:09:11 -0400 |
commit | d83b0e82ad055920fb7f05f85b9466d97b7182db (patch) | |
tree | b6caeac2222d6e76d53727b004c465d4b9ac4b45 | |
parent | 829dcc0a956a2317631873d946b5a5c2b0bf53ee (diff) |
MIPS: Allow FTLB to be turned on for CPU_P5600
Allow FTLB to be turned on or off for CPU_P5600 as well as CPU_PROAPTIV.
The existing if statement is converted into a switch to allow for future
expansion.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6411/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 0b9bbcb64afd..ee5de360636d 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -181,11 +181,12 @@ static char unknown_isa[] = KERN_ERR \ | |||
181 | static void set_ftlb_enable(struct cpuinfo_mips *c, int enable) | 181 | static void set_ftlb_enable(struct cpuinfo_mips *c, int enable) |
182 | { | 182 | { |
183 | unsigned int config6; | 183 | unsigned int config6; |
184 | /* | 184 | |
185 | * Config6 is implementation dependent and it's currently only | 185 | /* It's implementation dependent how the FTLB can be enabled */ |
186 | * used by proAptiv | 186 | switch (c->cputype) { |
187 | */ | 187 | case CPU_PROAPTIV: |
188 | if (c->cputype == CPU_PROAPTIV) { | 188 | case CPU_P5600: |
189 | /* proAptiv & related cores use Config6 to enable the FTLB */ | ||
189 | config6 = read_c0_config6(); | 190 | config6 = read_c0_config6(); |
190 | if (enable) | 191 | if (enable) |
191 | /* Enable FTLB */ | 192 | /* Enable FTLB */ |
@@ -194,6 +195,7 @@ static void set_ftlb_enable(struct cpuinfo_mips *c, int enable) | |||
194 | /* Disable FTLB */ | 195 | /* Disable FTLB */ |
195 | write_c0_config6(config6 & ~MIPS_CONF6_FTLBEN); | 196 | write_c0_config6(config6 & ~MIPS_CONF6_FTLBEN); |
196 | back_to_back_c0_hazard(); | 197 | back_to_back_c0_hazard(); |
198 | break; | ||
197 | } | 199 | } |
198 | } | 200 | } |
199 | 201 | ||