diff options
author | Steven J. Hill <sjhill@mips.com> | 2012-06-26 00:11:03 -0400 |
---|---|---|
committer | Steven J. Hill <sjhill@mips.com> | 2012-09-13 16:21:47 -0400 |
commit | 006a851b10a395955c153a145ad8241494d43688 (patch) | |
tree | e636786a07cf84b2e587c5403564465a9d5e8fd4 /arch/mips | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
MIPS: Add support for the 1074K core.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/cpu.h | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 2 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 4 | ||||
-rw-r--r-- | arch/mips/mm/c-r4k.c | 21 |
4 files changed, 28 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index f21b7c04e95a..20c27501b2a8 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -94,6 +94,7 @@ | |||
94 | #define PRID_IMP_24KE 0x9600 | 94 | #define PRID_IMP_24KE 0x9600 |
95 | #define PRID_IMP_74K 0x9700 | 95 | #define PRID_IMP_74K 0x9700 |
96 | #define PRID_IMP_1004K 0x9900 | 96 | #define PRID_IMP_1004K 0x9900 |
97 | #define PRID_IMP_1074K 0x9a00 | ||
97 | #define PRID_IMP_M14KC 0x9c00 | 98 | #define PRID_IMP_M14KC 0x9c00 |
98 | 99 | ||
99 | /* | 100 | /* |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 7f87d824eeb0..60731ff40f41 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -596,6 +596,8 @@ | |||
596 | #define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14) | 596 | #define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14) |
597 | #define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14) | 597 | #define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14) |
598 | 598 | ||
599 | #define MIPS_CONF6_SYND (_ULCAST_(1) << 13) | ||
600 | |||
599 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | 601 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) |
600 | 602 | ||
601 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) | 603 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 1b51046191e8..ed3eaf6409b4 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -857,6 +857,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) | |||
857 | c->cputype = CPU_1004K; | 857 | c->cputype = CPU_1004K; |
858 | __cpu_name[cpu] = "MIPS 1004Kc"; | 858 | __cpu_name[cpu] = "MIPS 1004Kc"; |
859 | break; | 859 | break; |
860 | case PRID_IMP_1074K: | ||
861 | c->cputype = CPU_74K; | ||
862 | __cpu_name[cpu] = "MIPS 1074Kc"; | ||
863 | break; | ||
860 | } | 864 | } |
861 | 865 | ||
862 | spram_config(); | 866 | spram_config(); |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index f092c265dc63..4c32ede464b5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -786,6 +786,25 @@ static inline void rm7k_erratum31(void) | |||
786 | } | 786 | } |
787 | } | 787 | } |
788 | 788 | ||
789 | static inline void alias_74k_erratum(struct cpuinfo_mips *c) | ||
790 | { | ||
791 | /* | ||
792 | * Early versions of the 74K do not update the cache tags on a | ||
793 | * vtag miss/ptag hit which can occur in the case of KSEG0/KUSEG | ||
794 | * aliases. In this case it is better to treat the cache as always | ||
795 | * having aliases. | ||
796 | */ | ||
797 | if ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(2, 4, 0)) | ||
798 | c->dcache.flags |= MIPS_CACHE_VTAG; | ||
799 | if ((c->processor_id & 0xff) == PRID_REV_ENCODE_332(2, 4, 0)) | ||
800 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); | ||
801 | if (((c->processor_id & 0xff00) == PRID_IMP_1074K) && | ||
802 | ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(1, 1, 0))) { | ||
803 | c->dcache.flags |= MIPS_CACHE_VTAG; | ||
804 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); | ||
805 | } | ||
806 | } | ||
807 | |||
789 | static char *way_string[] __cpuinitdata = { NULL, "direct mapped", "2-way", | 808 | static char *way_string[] __cpuinitdata = { NULL, "direct mapped", "2-way", |
790 | "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" | 809 | "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" |
791 | }; | 810 | }; |
@@ -1056,6 +1075,8 @@ static void __cpuinit probe_pcache(void) | |||
1056 | case CPU_34K: | 1075 | case CPU_34K: |
1057 | case CPU_74K: | 1076 | case CPU_74K: |
1058 | case CPU_1004K: | 1077 | case CPU_1004K: |
1078 | if (c->cputype == CPU_74K) | ||
1079 | alias_74k_erratum(c); | ||
1059 | if ((read_c0_config7() & (1 << 16))) { | 1080 | if ((read_c0_config7() & (1 << 16))) { |
1060 | /* effectively physically indexed dcache, | 1081 | /* effectively physically indexed dcache, |
1061 | thus no virtual aliases. */ | 1082 | thus no virtual aliases. */ |