diff options
author | Marc St-Jean <stjeanma@pmc-sierra.com> | 2007-06-14 17:55:31 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-10 12:33:03 -0400 |
commit | 9267a30d1dc7dcd7cadb5eb6a5bbfed703feeefa (patch) | |
tree | 91fa5a1a4605cdf0a1f1db21e22073b87735ce7a /arch | |
parent | 35832e26f95ba14a6b6f0519441c5cb64cca6bf9 (diff) |
[MIPS] PMC MSP71xx mips common
Patch to add mips common support for the PMC-Sierra MSP71xx devices.
Signed-off-by: Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-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 |
6 files changed, 121 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 |