aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-02-02 22:26:38 -0500
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 08:01:52 -0400
commit1091bfa20b94ba14a3c8a3eaf3a5b9d3df975da2 (patch)
tree93a0774dd3bf07eddc7be7f492df385d5182aa50
parent5cd0d5beef2bf34e3ec850aa75637e73fd8f5f82 (diff)
MIPS: Add P6600 cases to CPU switch statements
Add cases supporting the P6600 CPU to various switch statements in core MIPS kernel code that define behaviour dependent upon the CPU. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Petri Gynther <pgynther@google.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12343/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/cpu-type.h1
-rw-r--r--arch/mips/kernel/cpu-probe.c1
-rw-r--r--arch/mips/kernel/perf_event_mipsxx.c6
-rw-r--r--arch/mips/kernel/spram.c1
-rw-r--r--arch/mips/kernel/traps.c1
-rw-r--r--arch/mips/mm/c-r4k.c1
-rw-r--r--arch/mips/mm/sc-mips.c1
7 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu-type.h b/arch/mips/include/asm/cpu-type.h
index abee2bfd10dc..2cb0979b5dc5 100644
--- a/arch/mips/include/asm/cpu-type.h
+++ b/arch/mips/include/asm/cpu-type.h
@@ -79,6 +79,7 @@ static inline int __pure __get_cpu_type(const int cpu_type)
79 79
80#ifdef CONFIG_SYS_HAS_CPU_MIPS64_R6 80#ifdef CONFIG_SYS_HAS_CPU_MIPS64_R6
81 case CPU_I6400: 81 case CPU_I6400:
82 case CPU_P6600:
82#endif 83#endif
83 84
84#ifdef CONFIG_SYS_HAS_CPU_R3000 85#ifdef CONFIG_SYS_HAS_CPU_R3000
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index e0cfa3b85bca..388503867657 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -539,6 +539,7 @@ static int set_ftlb_enable(struct cpuinfo_mips *c, int enable)
539 switch (c->cputype) { 539 switch (c->cputype) {
540 case CPU_PROAPTIV: 540 case CPU_PROAPTIV:
541 case CPU_P5600: 541 case CPU_P5600:
542 case CPU_P6600:
542 /* proAptiv & related cores use Config6 to enable the FTLB */ 543 /* proAptiv & related cores use Config6 to enable the FTLB */
543 config = read_c0_config6(); 544 config = read_c0_config6();
544 /* Clear the old probability value */ 545 /* Clear the old probability value */
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index 9bc1191b1ab0..656769c166fc 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -1556,6 +1556,7 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
1556#endif 1556#endif
1557 break; 1557 break;
1558 case CPU_P5600: 1558 case CPU_P5600:
1559 case CPU_P6600:
1559 case CPU_I6400: 1560 case CPU_I6400:
1560 /* 8-bit event numbers */ 1561 /* 8-bit event numbers */
1561 raw_id = config & 0x1ff; 1562 raw_id = config & 0x1ff;
@@ -1718,6 +1719,11 @@ init_hw_perf_events(void)
1718 mipspmu.general_event_map = &mipsxxcore_event_map2; 1719 mipspmu.general_event_map = &mipsxxcore_event_map2;
1719 mipspmu.cache_event_map = &mipsxxcore_cache_map2; 1720 mipspmu.cache_event_map = &mipsxxcore_cache_map2;
1720 break; 1721 break;
1722 case CPU_P6600:
1723 mipspmu.name = "mips/P6600";
1724 mipspmu.general_event_map = &mipsxxcore_event_map2;
1725 mipspmu.cache_event_map = &mipsxxcore_cache_map2;
1726 break;
1721 case CPU_I6400: 1727 case CPU_I6400:
1722 mipspmu.name = "mips/I6400"; 1728 mipspmu.name = "mips/I6400";
1723 mipspmu.general_event_map = &mipsxxcore_event_map2; 1729 mipspmu.general_event_map = &mipsxxcore_event_map2;
diff --git a/arch/mips/kernel/spram.c b/arch/mips/kernel/spram.c
index 8489c88f9932..d6e6cf75114d 100644
--- a/arch/mips/kernel/spram.c
+++ b/arch/mips/kernel/spram.c
@@ -210,6 +210,7 @@ void spram_config(void)
210 case CPU_P5600: 210 case CPU_P5600:
211 case CPU_QEMU_GENERIC: 211 case CPU_QEMU_GENERIC:
212 case CPU_I6400: 212 case CPU_I6400:
213 case CPU_P6600:
213 config0 = read_c0_config(); 214 config0 = read_c0_config();
214 /* FIXME: addresses are Malta specific */ 215 /* FIXME: addresses are Malta specific */
215 if (config0 & (1<<24)) { 216 if (config0 & (1<<24)) {
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index bd4893feffa6..4358f025b752 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1644,6 +1644,7 @@ static inline void parity_protection_init(void)
1644 case CPU_P5600: 1644 case CPU_P5600:
1645 case CPU_QEMU_GENERIC: 1645 case CPU_QEMU_GENERIC:
1646 case CPU_I6400: 1646 case CPU_I6400:
1647 case CPU_P6600:
1647 { 1648 {
1648#define ERRCTL_PE 0x80000000 1649#define ERRCTL_PE 0x80000000
1649#define ERRCTL_L2P 0x00800000 1650#define ERRCTL_L2P 0x00800000
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 69e7e5873af3..729a7d48ceee 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1285,6 +1285,7 @@ static void probe_pcache(void)
1285 case CPU_M5150: 1285 case CPU_M5150:
1286 case CPU_QEMU_GENERIC: 1286 case CPU_QEMU_GENERIC:
1287 case CPU_I6400: 1287 case CPU_I6400:
1288 case CPU_P6600:
1288 if (!(read_c0_config7() & MIPS_CONF7_IAR) && 1289 if (!(read_c0_config7() & MIPS_CONF7_IAR) &&
1289 (c->icache.waysize > PAGE_SIZE)) 1290 (c->icache.waysize > PAGE_SIZE))
1290 c->icache.flags |= MIPS_CACHE_ALIASES; 1291 c->icache.flags |= MIPS_CACHE_ALIASES;
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
index 91dec32c77b7..286a4d5a1884 100644
--- a/arch/mips/mm/sc-mips.c
+++ b/arch/mips/mm/sc-mips.c
@@ -141,6 +141,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
141 case CPU_P5600: 141 case CPU_P5600:
142 case CPU_BMIPS5000: 142 case CPU_BMIPS5000:
143 case CPU_QEMU_GENERIC: 143 case CPU_QEMU_GENERIC:
144 case CPU_P6600:
144 if (config2 & (1 << 12)) 145 if (config2 & (1 << 12))
145 return 0; 146 return 0;
146 } 147 }