diff options
author | Steven J. Hill <Steven.Hill@imgtec.com> | 2014-01-17 16:03:50 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-06 15:25:21 -0500 |
commit | 442e14a2c55e55f208bf87e3686396b4ff17ebf6 (patch) | |
tree | 9370c3907bb6b07027a95181d2e5ee3961641ec3 | |
parent | 02dc6bfb080e8205aacea5c4b4dd6a9bd4c9406e (diff) |
MIPS: Add 1074K CPU support explicitly.
The 1074K is a multiprocessing coherent processing system (CPS) based
on modified 74K cores. This patch makes the 1074K an actual unique
CPU type, instead of a 74K derivative, which it is not.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Reviewed-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6389/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/bcm47xx/setup.c | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/cpu.h | 2 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/idle.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/perf_event_mipsxx.c | 6 | ||||
-rw-r--r-- | arch/mips/kernel/spram.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/c-r4k.c | 3 | ||||
-rw-r--r-- | arch/mips/mm/sc-mips.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 1 | ||||
-rw-r--r-- | arch/mips/oprofile/common.c | 1 | ||||
-rw-r--r-- | arch/mips/oprofile/op_model_mipsxx.c | 1 |
12 files changed, 18 insertions, 4 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index 025be218ea15..b847d0373443 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
@@ -212,7 +212,7 @@ void __init plat_mem_setup(void) | |||
212 | { | 212 | { |
213 | struct cpuinfo_mips *c = ¤t_cpu_data; | 213 | struct cpuinfo_mips *c = ¤t_cpu_data; |
214 | 214 | ||
215 | if (c->cputype == CPU_74K) { | 215 | if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) { |
216 | printk(KERN_INFO "bcm47xx: using bcma bus\n"); | 216 | printk(KERN_INFO "bcm47xx: using bcma bus\n"); |
217 | #ifdef CONFIG_BCM47XX_BCMA | 217 | #ifdef CONFIG_BCM47XX_BCMA |
218 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; | 218 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; |
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 76411df3d971..559c668f7e5c 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -296,7 +296,7 @@ enum cpu_type_enum { | |||
296 | CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, | 296 | CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, |
297 | CPU_ALCHEMY, CPU_PR4450, CPU_BMIPS32, CPU_BMIPS3300, CPU_BMIPS4350, | 297 | CPU_ALCHEMY, CPU_PR4450, CPU_BMIPS32, CPU_BMIPS3300, CPU_BMIPS4350, |
298 | CPU_BMIPS4380, CPU_BMIPS5000, CPU_JZRISC, CPU_LOONGSON1, CPU_M14KC, | 298 | CPU_BMIPS4380, CPU_BMIPS5000, CPU_JZRISC, CPU_LOONGSON1, CPU_M14KC, |
299 | CPU_M14KEC, CPU_INTERAPTIV, CPU_PROAPTIV, | 299 | CPU_M14KEC, CPU_INTERAPTIV, CPU_PROAPTIV, CPU_1074K, |
300 | 300 | ||
301 | /* | 301 | /* |
302 | * MIPS64 class processors | 302 | * MIPS64 class processors |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 530f832de02c..ac09248b7468 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -806,7 +806,7 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) | |||
806 | __cpu_name[cpu] = "MIPS 1004Kc"; | 806 | __cpu_name[cpu] = "MIPS 1004Kc"; |
807 | break; | 807 | break; |
808 | case PRID_IMP_1074K: | 808 | case PRID_IMP_1074K: |
809 | c->cputype = CPU_74K; | 809 | c->cputype = CPU_1074K; |
810 | __cpu_name[cpu] = "MIPS 1074Kc"; | 810 | __cpu_name[cpu] = "MIPS 1074Kc"; |
811 | break; | 811 | break; |
812 | case PRID_IMP_INTERAPTIV_UP: | 812 | case PRID_IMP_INTERAPTIV_UP: |
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c index 3553243bf9d6..c1fd0bc7a315 100644 --- a/arch/mips/kernel/idle.c +++ b/arch/mips/kernel/idle.c | |||
@@ -184,6 +184,7 @@ void __init check_wait(void) | |||
184 | case CPU_24K: | 184 | case CPU_24K: |
185 | case CPU_34K: | 185 | case CPU_34K: |
186 | case CPU_1004K: | 186 | case CPU_1004K: |
187 | case CPU_1074K: | ||
187 | case CPU_INTERAPTIV: | 188 | case CPU_INTERAPTIV: |
188 | case CPU_PROAPTIV: | 189 | case CPU_PROAPTIV: |
189 | cpu_wait = r4k_wait; | 190 | cpu_wait = r4k_wait; |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index 24cdf64789c3..17594b81a5d2 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -1442,6 +1442,7 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config) | |||
1442 | #endif | 1442 | #endif |
1443 | break; | 1443 | break; |
1444 | case CPU_74K: | 1444 | case CPU_74K: |
1445 | case CPU_1074K: | ||
1445 | if (IS_BOTH_COUNTERS_74K_EVENT(base_id)) | 1446 | if (IS_BOTH_COUNTERS_74K_EVENT(base_id)) |
1446 | raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD; | 1447 | raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD; |
1447 | else | 1448 | else |
@@ -1584,6 +1585,11 @@ init_hw_perf_events(void) | |||
1584 | mipspmu.general_event_map = &mipsxxcore_event_map; | 1585 | mipspmu.general_event_map = &mipsxxcore_event_map; |
1585 | mipspmu.cache_event_map = &mipsxxcore_cache_map; | 1586 | mipspmu.cache_event_map = &mipsxxcore_cache_map; |
1586 | break; | 1587 | break; |
1588 | case CPU_1074K: | ||
1589 | mipspmu.name = "mips/1074K"; | ||
1590 | mipspmu.general_event_map = &mipsxxcore_event_map; | ||
1591 | mipspmu.cache_event_map = &mipsxxcore_cache_map; | ||
1592 | break; | ||
1587 | case CPU_LOONGSON1: | 1593 | case CPU_LOONGSON1: |
1588 | mipspmu.name = "mips/loongson1"; | 1594 | mipspmu.name = "mips/loongson1"; |
1589 | mipspmu.general_event_map = &mipsxxcore_event_map; | 1595 | mipspmu.general_event_map = &mipsxxcore_event_map; |
diff --git a/arch/mips/kernel/spram.c b/arch/mips/kernel/spram.c index b242e2c10ea0..707d957e6a66 100644 --- a/arch/mips/kernel/spram.c +++ b/arch/mips/kernel/spram.c | |||
@@ -205,6 +205,7 @@ void spram_config(void) | |||
205 | case CPU_34K: | 205 | case CPU_34K: |
206 | case CPU_74K: | 206 | case CPU_74K: |
207 | case CPU_1004K: | 207 | case CPU_1004K: |
208 | case CPU_1074K: | ||
208 | case CPU_INTERAPTIV: | 209 | case CPU_INTERAPTIV: |
209 | case CPU_PROAPTIV: | 210 | case CPU_PROAPTIV: |
210 | config0 = read_c0_config(); | 211 | config0 = read_c0_config(); |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index e0b499694d18..b0c7f80e05e5 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1337,6 +1337,7 @@ static inline void parity_protection_init(void) | |||
1337 | case CPU_34K: | 1337 | case CPU_34K: |
1338 | case CPU_74K: | 1338 | case CPU_74K: |
1339 | case CPU_1004K: | 1339 | case CPU_1004K: |
1340 | case CPU_1074K: | ||
1340 | case CPU_INTERAPTIV: | 1341 | case CPU_INTERAPTIV: |
1341 | case CPU_PROAPTIV: | 1342 | case CPU_PROAPTIV: |
1342 | { | 1343 | { |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 8f1d549d5132..ae810320875e 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -1113,9 +1113,10 @@ static void probe_pcache(void) | |||
1113 | case CPU_34K: | 1113 | case CPU_34K: |
1114 | case CPU_74K: | 1114 | case CPU_74K: |
1115 | case CPU_1004K: | 1115 | case CPU_1004K: |
1116 | case CPU_1074K: | ||
1116 | case CPU_INTERAPTIV: | 1117 | case CPU_INTERAPTIV: |
1117 | case CPU_PROAPTIV: | 1118 | case CPU_PROAPTIV: |
1118 | if (current_cpu_type() == CPU_74K) | 1119 | if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) |
1119 | alias_74k_erratum(c); | 1120 | alias_74k_erratum(c); |
1120 | if (!(read_c0_config7() & MIPS_CONF7_IAR) && | 1121 | if (!(read_c0_config7() & MIPS_CONF7_IAR) && |
1121 | (c->icache.waysize > PAGE_SIZE)) | 1122 | (c->icache.waysize > PAGE_SIZE)) |
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c index 7a56aee5fce7..7b3977035a46 100644 --- a/arch/mips/mm/sc-mips.c +++ b/arch/mips/mm/sc-mips.c | |||
@@ -76,6 +76,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c) | |||
76 | case CPU_34K: | 76 | case CPU_34K: |
77 | case CPU_74K: | 77 | case CPU_74K: |
78 | case CPU_1004K: | 78 | case CPU_1004K: |
79 | case CPU_1074K: | ||
79 | case CPU_INTERAPTIV: | 80 | case CPU_INTERAPTIV: |
80 | case CPU_PROAPTIV: | 81 | case CPU_PROAPTIV: |
81 | case CPU_BMIPS5000: | 82 | case CPU_BMIPS5000: |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index b234b1b5ccad..151ca264c8a6 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -509,6 +509,7 @@ static void build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
509 | switch (current_cpu_type()) { | 509 | switch (current_cpu_type()) { |
510 | case CPU_M14KC: | 510 | case CPU_M14KC: |
511 | case CPU_74K: | 511 | case CPU_74K: |
512 | case CPU_1074K: | ||
512 | case CPU_PROAPTIV: | 513 | case CPU_PROAPTIV: |
513 | break; | 514 | break; |
514 | 515 | ||
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 2a86e38872a7..710e7f010533 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -86,6 +86,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
86 | case CPU_34K: | 86 | case CPU_34K: |
87 | case CPU_1004K: | 87 | case CPU_1004K: |
88 | case CPU_74K: | 88 | case CPU_74K: |
89 | case CPU_1074K: | ||
89 | case CPU_INTERAPTIV: | 90 | case CPU_INTERAPTIV: |
90 | case CPU_PROAPTIV: | 91 | case CPU_PROAPTIV: |
91 | case CPU_LOONGSON1: | 92 | case CPU_LOONGSON1: |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 4d94d75ec6f9..3a040ebb8378 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -372,6 +372,7 @@ static int __init mipsxx_init(void) | |||
372 | op_model_mipsxx_ops.cpu_type = "mips/34K"; | 372 | op_model_mipsxx_ops.cpu_type = "mips/34K"; |
373 | break; | 373 | break; |
374 | 374 | ||
375 | case CPU_1074K: | ||
375 | case CPU_74K: | 376 | case CPU_74K: |
376 | op_model_mipsxx_ops.cpu_type = "mips/74K"; | 377 | op_model_mipsxx_ops.cpu_type = "mips/74K"; |
377 | break; | 378 | break; |