diff options
-rw-r--r-- | arch/mips/Kconfig | 35 | ||||
-rw-r--r-- | arch/mips/Makefile | 11 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 20 | ||||
-rw-r--r-- | arch/mips/kernel/head.S | 5 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/mips/pmc-sierra/Kconfig | 46 | ||||
-rw-r--r-- | include/asm-mips/bootinfo.h | 12 | ||||
-rw-r--r-- | include/asm-mips/cpu.h | 2 | ||||
-rw-r--r-- | include/asm-mips/mipsregs.h | 33 | ||||
-rw-r--r-- | include/asm-mips/war.h | 11 |
10 files changed, 179 insertions, 2 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3994f611ec26..2076d472ea99 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -250,6 +250,7 @@ config MIPS_SIM | |||
250 | select DMA_NONCOHERENT | 250 | select DMA_NONCOHERENT |
251 | select SYS_HAS_EARLY_PRINTK | 251 | select SYS_HAS_EARLY_PRINTK |
252 | select IRQ_CPU | 252 | select IRQ_CPU |
253 | select BOOT_RAW | ||
253 | select SYS_HAS_CPU_MIPS32_R1 | 254 | select SYS_HAS_CPU_MIPS32_R1 |
254 | select SYS_HAS_CPU_MIPS32_R2 | 255 | select SYS_HAS_CPU_MIPS32_R2 |
255 | select SYS_HAS_EARLY_PRINTK | 256 | select SYS_HAS_EARLY_PRINTK |
@@ -333,6 +334,27 @@ config MACH_VR41XX | |||
333 | select SYS_HAS_CPU_VR41XX | 334 | select SYS_HAS_CPU_VR41XX |
334 | select GENERIC_HARDIRQS_NO__DO_IRQ | 335 | select GENERIC_HARDIRQS_NO__DO_IRQ |
335 | 336 | ||
337 | config PMC_MSP | ||
338 | bool "PMC-Sierra MSP chipsets" | ||
339 | depends on EXPERIMENTAL | ||
340 | select DMA_NONCOHERENT | ||
341 | select SWAP_IO_SPACE | ||
342 | select NO_EXCEPT_FILL | ||
343 | select BOOT_RAW | ||
344 | select SYS_HAS_CPU_MIPS32_R1 | ||
345 | select SYS_HAS_CPU_MIPS32_R2 | ||
346 | select SYS_SUPPORTS_32BIT_KERNEL | ||
347 | select SYS_SUPPORTS_BIG_ENDIAN | ||
348 | select SYS_SUPPORTS_KGDB | ||
349 | select IRQ_CPU | ||
350 | select SERIAL_8250 | ||
351 | select SERIAL_8250_CONSOLE | ||
352 | help | ||
353 | This adds support for the PMC-Sierra family of Multi-Service | ||
354 | Processor System-On-A-Chips. These parts include a number | ||
355 | of integrated peripherals, interfaces and DSPs in addition to | ||
356 | a variety of MIPS cores. | ||
357 | |||
336 | config PMC_YOSEMITE | 358 | config PMC_YOSEMITE |
337 | bool "PMC-Sierra Yosemite eval board" | 359 | bool "PMC-Sierra Yosemite eval board" |
338 | select DMA_COHERENT | 360 | select DMA_COHERENT |
@@ -706,6 +728,9 @@ config ARC | |||
706 | config ARCH_MAY_HAVE_PC_FDC | 728 | config ARCH_MAY_HAVE_PC_FDC |
707 | bool | 729 | bool |
708 | 730 | ||
731 | config BOOT_RAW | ||
732 | bool | ||
733 | |||
709 | config DMA_COHERENT | 734 | config DMA_COHERENT |
710 | bool | 735 | bool |
711 | 736 | ||
@@ -812,6 +837,12 @@ config IRQ_CPU_RM7K | |||
812 | config IRQ_CPU_RM9K | 837 | config IRQ_CPU_RM9K |
813 | bool | 838 | bool |
814 | 839 | ||
840 | config IRQ_MSP_SLP | ||
841 | bool | ||
842 | |||
843 | config IRQ_MSP_CIC | ||
844 | bool | ||
845 | |||
815 | config IRQ_MV64340 | 846 | config IRQ_MV64340 |
816 | bool | 847 | bool |
817 | 848 | ||
@@ -825,6 +856,9 @@ config MIPS_BOARDS_GEN | |||
825 | config PCI_GT64XXX_PCI0 | 856 | config PCI_GT64XXX_PCI0 |
826 | bool | 857 | bool |
827 | 858 | ||
859 | config NO_EXCEPT_FILL | ||
860 | bool | ||
861 | |||
828 | config MIPS_TX3927 | 862 | config MIPS_TX3927 |
829 | bool | 863 | bool |
830 | select HAS_TXX9_SERIAL | 864 | select HAS_TXX9_SERIAL |
@@ -886,6 +920,7 @@ config MIPS_L1_CACHE_SHIFT | |||
886 | int | 920 | int |
887 | default "4" if MACH_DECSTATION || SNI_RM | 921 | default "4" if MACH_DECSTATION || SNI_RM |
888 | default "7" if SGI_IP27 | 922 | default "7" if SGI_IP27 |
923 | default "4" if PMC_MSP4200_EVAL | ||
889 | default "5" | 924 | default "5" |
890 | 925 | ||
891 | config HAVE_STD_PC_SERIAL_PORT | 926 | config HAVE_STD_PC_SERIAL_PORT |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6642ee5fdc46..2b9af2fd5507 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -343,6 +343,14 @@ cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot | |||
343 | load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000 | 343 | load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000 |
344 | 344 | ||
345 | # | 345 | # |
346 | # PMC-Sierra MSP SOCs | ||
347 | # | ||
348 | core-$(CONFIG_PMC_MSP) += arch/mips/pmc-sierra/msp71xx/ | ||
349 | cflags-$(CONFIG_PMC_MSP) += -Iinclude/asm-mips/pmc-sierra/msp71xx \ | ||
350 | -mno-branch-likely | ||
351 | load-$(CONFIG_PMC_MSP) += 0xffffffff80100000 | ||
352 | |||
353 | # | ||
346 | # PMC-Sierra Yosemite | 354 | # PMC-Sierra Yosemite |
347 | # | 355 | # |
348 | core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/ | 356 | core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/ |
@@ -595,7 +603,8 @@ JIFFIES = jiffies_64 | |||
595 | endif | 603 | endif |
596 | 604 | ||
597 | AFLAGS += $(cflags-y) | 605 | AFLAGS += $(cflags-y) |
598 | CFLAGS += $(cflags-y) | 606 | CFLAGS += $(cflags-y) \ |
607 | -D"VMLINUX_LOAD_ADDRESS=$(load-y)" | ||
599 | 608 | ||
600 | LDFLAGS += -m $(ld-emul) | 609 | LDFLAGS += -m $(ld-emul) |
601 | 610 | ||
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 23d8a3b7dd75..c6b8b074a81a 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -186,9 +186,29 @@ static inline void check_wait(void) | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | static inline void check_errata(void) | ||
190 | { | ||
191 | struct cpuinfo_mips *c = ¤t_cpu_data; | ||
192 | |||
193 | switch (c->cputype) { | ||
194 | case CPU_34K: | ||
195 | /* | ||
196 | * Erratum "RPS May Cause Incorrect Instruction Execution" | ||
197 | * This code only handles VPE0, any SMP/SMTC/RTOS code | ||
198 | * making use of VPE1 will be responsable for that VPE. | ||
199 | */ | ||
200 | if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2) | ||
201 | write_c0_config7(read_c0_config7() | MIPS_CONF7_RPS); | ||
202 | break; | ||
203 | default: | ||
204 | break; | ||
205 | } | ||
206 | } | ||
207 | |||
189 | void __init check_bugs32(void) | 208 | void __init check_bugs32(void) |
190 | { | 209 | { |
191 | check_wait(); | 210 | check_wait(); |
211 | check_errata(); | ||
192 | } | 212 | } |
193 | 213 | ||
194 | /* | 214 | /* |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 1f096aa35bc0..f78538eceef7 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/threads.h> | 17 | #include <linux/threads.h> |
18 | 18 | ||
19 | #include <asm/addrspace.h> | ||
19 | #include <asm/asm.h> | 20 | #include <asm/asm.h> |
20 | #include <asm/asmmacro.h> | 21 | #include <asm/asmmacro.h> |
21 | #include <asm/irqflags.h> | 22 | #include <asm/irqflags.h> |
@@ -129,16 +130,18 @@ | |||
129 | #endif | 130 | #endif |
130 | .endm | 131 | .endm |
131 | 132 | ||
133 | #ifndef CONFIG_NO_EXCEPT_FILL | ||
132 | /* | 134 | /* |
133 | * Reserved space for exception handlers. | 135 | * Reserved space for exception handlers. |
134 | * Necessary for machines which link their kernels at KSEG0. | 136 | * Necessary for machines which link their kernels at KSEG0. |
135 | */ | 137 | */ |
136 | .fill 0x400 | 138 | .fill 0x400 |
139 | #endif | ||
137 | 140 | ||
138 | EXPORT(stext) # used for profiling | 141 | EXPORT(stext) # used for profiling |
139 | EXPORT(_stext) | 142 | EXPORT(_stext) |
140 | 143 | ||
141 | #ifndef CONFIG_MIPS_SIM | 144 | #ifdef CONFIG_BOOT_RAW |
142 | /* | 145 | /* |
143 | * Give us a fighting chance of running if execution beings at the | 146 | * Give us a fighting chance of running if execution beings at the |
144 | * kernel load address. This is needed because this platform does | 147 | * kernel load address. This is needed because this platform does |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 9b19a84d11ef..80ea4fa95bd9 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -69,6 +69,7 @@ extern asmlinkage void handle_reserved(void); | |||
69 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, | 69 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, |
70 | struct mips_fpu_struct *ctx, int has_fpu); | 70 | struct mips_fpu_struct *ctx, int has_fpu); |
71 | 71 | ||
72 | void (*board_watchpoint_handler)(struct pt_regs *regs); | ||
72 | void (*board_be_init)(void); | 73 | void (*board_be_init)(void); |
73 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | 74 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); |
74 | void (*board_nmi_handler_setup)(void); | 75 | void (*board_nmi_handler_setup)(void); |
@@ -833,6 +834,11 @@ asmlinkage void do_mdmx(struct pt_regs *regs) | |||
833 | 834 | ||
834 | asmlinkage void do_watch(struct pt_regs *regs) | 835 | asmlinkage void do_watch(struct pt_regs *regs) |
835 | { | 836 | { |
837 | if (board_watchpoint_handler) { | ||
838 | (*board_watchpoint_handler)(regs); | ||
839 | return; | ||
840 | } | ||
841 | |||
836 | /* | 842 | /* |
837 | * We use the watch exception where available to detect stack | 843 | * We use the watch exception where available to detect stack |
838 | * overflows. | 844 | * overflows. |
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig index 24d514c9dff9..abbd0bbfabd7 100644 --- a/arch/mips/pmc-sierra/Kconfig +++ b/arch/mips/pmc-sierra/Kconfig | |||
@@ -1,3 +1,49 @@ | |||
1 | choice | ||
2 | prompt "PMC-Sierra MSP SOC type" | ||
3 | depends on PMC_MSP | ||
4 | |||
5 | config PMC_MSP4200_EVAL | ||
6 | bool "PMC-Sierra MSP4200 Eval Board" | ||
7 | select IRQ_MSP_SLP | ||
8 | select HW_HAS_PCI | ||
9 | |||
10 | config PMC_MSP4200_GW | ||
11 | bool "PMC-Sierra MSP4200 VoIP Gateway" | ||
12 | select IRQ_MSP_SLP | ||
13 | select HW_HAS_PCI | ||
14 | |||
15 | config PMC_MSP7120_EVAL | ||
16 | bool "PMC-Sierra MSP7120 Eval Board" | ||
17 | select SYS_SUPPORTS_MULTITHREADING | ||
18 | select IRQ_MSP_CIC | ||
19 | select HW_HAS_PCI | ||
20 | |||
21 | config PMC_MSP7120_GW | ||
22 | bool "PMC-Sierra MSP7120 Residential Gateway" | ||
23 | select SYS_SUPPORTS_MULTITHREADING | ||
24 | select IRQ_MSP_CIC | ||
25 | select HW_HAS_PCI | ||
26 | |||
27 | config PMC_MSP7120_FPGA | ||
28 | bool "PMC-Sierra MSP7120 FPGA" | ||
29 | select SYS_SUPPORTS_MULTITHREADING | ||
30 | select IRQ_MSP_CIC | ||
31 | select HW_HAS_PCI | ||
32 | |||
33 | endchoice | ||
34 | |||
35 | menu "Options for PMC-Sierra MSP chipsets" | ||
36 | depends on PMC_MSP | ||
37 | |||
38 | config PMC_MSP_EMBEDDED_ROOTFS | ||
39 | bool "Root filesystem embedded in kernel image" | ||
40 | select MTD | ||
41 | select MTD_BLOCK | ||
42 | select MTD_PMC_MSP_RAMROOT | ||
43 | select MTD_RAM | ||
44 | |||
45 | endmenu | ||
46 | |||
1 | config HYPERTRANSPORT | 47 | config HYPERTRANSPORT |
2 | bool "Hypertransport Support for PMC-Sierra Yosemite" | 48 | bool "Hypertransport Support for PMC-Sierra Yosemite" |
3 | depends on PMC_YOSEMITE | 49 | depends on PMC_YOSEMITE |
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 12f9d7139ebf..94fc9be1aab6 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -213,6 +213,18 @@ | |||
213 | #define MACH_GROUP_LEMOTE 27 | 213 | #define MACH_GROUP_LEMOTE 27 |
214 | #define MACH_LEMOTE_FULONG 0 | 214 | #define MACH_LEMOTE_FULONG 0 |
215 | 215 | ||
216 | /* | ||
217 | * Valid machtype for group PMC-MSP | ||
218 | */ | ||
219 | #define MACH_GROUP_MSP 26 /* PMC-Sierra MSP boards/CPUs */ | ||
220 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ | ||
221 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ | ||
222 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ | ||
223 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ | ||
224 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ | ||
225 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ | ||
226 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ | ||
227 | |||
216 | #define CL_SIZE COMMAND_LINE_SIZE | 228 | #define CL_SIZE COMMAND_LINE_SIZE |
217 | 229 | ||
218 | const char *get_system_type(void); | 230 | const char *get_system_type(void); |
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index a3623954dad1..3857358fb6de 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -109,6 +109,7 @@ | |||
109 | * Definitions for 7:0 on legacy processors | 109 | * Definitions for 7:0 on legacy processors |
110 | */ | 110 | */ |
111 | 111 | ||
112 | #define PRID_REV_MASK 0x00ff | ||
112 | 113 | ||
113 | #define PRID_REV_TX4927 0x0022 | 114 | #define PRID_REV_TX4927 0x0022 |
114 | #define PRID_REV_TX4937 0x0030 | 115 | #define PRID_REV_TX4937 0x0030 |
@@ -125,6 +126,7 @@ | |||
125 | #define PRID_REV_VR4122 0x0070 | 126 | #define PRID_REV_VR4122 0x0070 |
126 | #define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ | 127 | #define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ |
127 | #define PRID_REV_VR4130 0x0080 | 128 | #define PRID_REV_VR4130 0x0080 |
129 | #define PRID_REV_34K_V1_0_2 0x0022 | ||
128 | 130 | ||
129 | /* | 131 | /* |
130 | * Older processors used to encode processor version and revision in two | 132 | * Older processors used to encode processor version and revision in two |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 668db02c2804..706b3691f57e 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <asm/hazards.h> | 17 | #include <asm/hazards.h> |
18 | #include <asm/war.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * The following macros are especially useful for __asm__ | 21 | * The following macros are especially useful for __asm__ |
@@ -537,6 +538,9 @@ | |||
537 | 538 | ||
538 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | 539 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) |
539 | 540 | ||
541 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) | ||
542 | |||
543 | |||
540 | /* | 544 | /* |
541 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. | 545 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. |
542 | */ | 546 | */ |
@@ -1298,10 +1302,39 @@ static inline void tlb_probe(void) | |||
1298 | 1302 | ||
1299 | static inline void tlb_read(void) | 1303 | static inline void tlb_read(void) |
1300 | { | 1304 | { |
1305 | #if MIPS34K_MISSED_ITLB_WAR | ||
1306 | int res = 0; | ||
1307 | |||
1308 | __asm__ __volatile__( | ||
1309 | " .set push \n" | ||
1310 | " .set noreorder \n" | ||
1311 | " .set noat \n" | ||
1312 | " .set mips32r2 \n" | ||
1313 | " .word 0x41610001 # dvpe $1 \n" | ||
1314 | " move %0, $1 \n" | ||
1315 | " ehb \n" | ||
1316 | " .set pop \n" | ||
1317 | : "=r" (res)); | ||
1318 | |||
1319 | instruction_hazard(); | ||
1320 | #endif | ||
1321 | |||
1301 | __asm__ __volatile__( | 1322 | __asm__ __volatile__( |
1302 | ".set noreorder\n\t" | 1323 | ".set noreorder\n\t" |
1303 | "tlbr\n\t" | 1324 | "tlbr\n\t" |
1304 | ".set reorder"); | 1325 | ".set reorder"); |
1326 | |||
1327 | #if MIPS34K_MISSED_ITLB_WAR | ||
1328 | if ((res & _ULCAST_(1))) | ||
1329 | __asm__ __volatile__( | ||
1330 | " .set push \n" | ||
1331 | " .set noreorder \n" | ||
1332 | " .set noat \n" | ||
1333 | " .set mips32r2 \n" | ||
1334 | " .word 0x41600021 # evpe \n" | ||
1335 | " ehb \n" | ||
1336 | " .set pop \n"); | ||
1337 | #endif | ||
1305 | } | 1338 | } |
1306 | 1339 | ||
1307 | static inline void tlb_write_indexed(void) | 1340 | static inline void tlb_write_indexed(void) |
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index c507f1b8014e..45cb82724830 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -198,6 +198,14 @@ | |||
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | /* | 200 | /* |
201 | * 34K core erratum: "Problems Executing the TLBR Instruction" | ||
202 | */ | ||
203 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ | ||
204 | defined(CONFIG_PMC_MSP7120_FPGA) | ||
205 | #define MIPS34K_MISSED_ITLB_WAR 1 | ||
206 | #endif | ||
207 | |||
208 | /* | ||
201 | * Workarounds default to off | 209 | * Workarounds default to off |
202 | */ | 210 | */ |
203 | #ifndef ICACHE_REFILLS_WORKAROUND_WAR | 211 | #ifndef ICACHE_REFILLS_WORKAROUND_WAR |
@@ -236,5 +244,8 @@ | |||
236 | #ifndef R10000_LLSC_WAR | 244 | #ifndef R10000_LLSC_WAR |
237 | #define R10000_LLSC_WAR 0 | 245 | #define R10000_LLSC_WAR 0 |
238 | #endif | 246 | #endif |
247 | #ifndef MIPS34K_MISSED_ITLB_WAR | ||
248 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
249 | #endif | ||
239 | 250 | ||
240 | #endif /* _ASM_WAR_H */ | 251 | #endif /* _ASM_WAR_H */ |