summaryrefslogtreecommitdiffstats
path: root/arch/mips/pmcs-msp71xx
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-05-23 10:29:44 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 18:07:01 -0400
commitb633648c5ad3cfbda0b3daea50d2135d44899259 (patch)
tree6100185cae10f36a55e71c3b220fc79cfa14b7c0 /arch/mips/pmcs-msp71xx
parent8b2e62cc34feaaf1cac9440a93fb18ac0b1e81bc (diff)
MIPS: MT: Remove SMTC support
Nobody is maintaining SMTC anymore and there also seems to be no userbase. Which is a pity - the SMTC technology primarily developed by Kevin D. Kissell <kevink@paralogos.com> is an ingenious demonstration for the MT ASE's power and elegance. Based on Markos Chandras <Markos.Chandras@imgtec.com> patch https://patchwork.linux-mips.org/patch/6719/ which while very similar did no longer apply cleanly when I tried to merge it plus some additional post-SMTC cleanup - SMTC was a feature as tricky to remove as it was to merge once upon a time. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pmcs-msp71xx')
-rw-r--r--arch/mips/pmcs-msp71xx/Makefile1
-rw-r--r--arch/mips/pmcs-msp71xx/msp_irq.c16
-rw-r--r--arch/mips/pmcs-msp71xx/msp_irq_cic.c7
-rw-r--r--arch/mips/pmcs-msp71xx/msp_irq_per.c3
-rw-r--r--arch/mips/pmcs-msp71xx/msp_setup.c8
-rw-r--r--arch/mips/pmcs-msp71xx/msp_smtc.c104
6 files changed, 7 insertions, 132 deletions
diff --git a/arch/mips/pmcs-msp71xx/Makefile b/arch/mips/pmcs-msp71xx/Makefile
index 9201c8b3858d..d4f7220f2485 100644
--- a/arch/mips/pmcs-msp71xx/Makefile
+++ b/arch/mips/pmcs-msp71xx/Makefile
@@ -10,4 +10,3 @@ obj-$(CONFIG_PCI) += msp_pci.o
10obj-$(CONFIG_MSP_HAS_MAC) += msp_eth.o 10obj-$(CONFIG_MSP_HAS_MAC) += msp_eth.o
11obj-$(CONFIG_MSP_HAS_USB) += msp_usb.o 11obj-$(CONFIG_MSP_HAS_USB) += msp_usb.o
12obj-$(CONFIG_MIPS_MT_SMP) += msp_smp.o 12obj-$(CONFIG_MIPS_MT_SMP) += msp_smp.o
13obj-$(CONFIG_MIPS_MT_SMTC) += msp_smtc.o
diff --git a/arch/mips/pmcs-msp71xx/msp_irq.c b/arch/mips/pmcs-msp71xx/msp_irq.c
index 9da5619c00a5..941744aabb51 100644
--- a/arch/mips/pmcs-msp71xx/msp_irq.c
+++ b/arch/mips/pmcs-msp71xx/msp_irq.c
@@ -32,7 +32,7 @@ extern void msp_vsmp_int_init(void);
32 32
33/* vectored interrupt implementation */ 33/* vectored interrupt implementation */
34 34
35/* SW0/1 interrupts are used for SMP/SMTC */ 35/* SW0/1 interrupts are used for SMP */
36static inline void mac0_int_dispatch(void) { do_IRQ(MSP_INT_MAC0); } 36static inline void mac0_int_dispatch(void) { do_IRQ(MSP_INT_MAC0); }
37static inline void mac1_int_dispatch(void) { do_IRQ(MSP_INT_MAC1); } 37static inline void mac1_int_dispatch(void) { do_IRQ(MSP_INT_MAC1); }
38static inline void mac2_int_dispatch(void) { do_IRQ(MSP_INT_SAR); } 38static inline void mac2_int_dispatch(void) { do_IRQ(MSP_INT_SAR); }
@@ -138,14 +138,6 @@ void __init arch_init_irq(void)
138 set_vi_handler(MSP_INT_SEC, sec_int_dispatch); 138 set_vi_handler(MSP_INT_SEC, sec_int_dispatch);
139#ifdef CONFIG_MIPS_MT_SMP 139#ifdef CONFIG_MIPS_MT_SMP
140 msp_vsmp_int_init(); 140 msp_vsmp_int_init();
141#elif defined CONFIG_MIPS_MT_SMTC
142 /*Set hwmask for all platform devices */
143 irq_hwmask[MSP_INT_MAC0] = C_IRQ0;
144 irq_hwmask[MSP_INT_MAC1] = C_IRQ1;
145 irq_hwmask[MSP_INT_USB] = C_IRQ2;
146 irq_hwmask[MSP_INT_SAR] = C_IRQ3;
147 irq_hwmask[MSP_INT_SEC] = C_IRQ5;
148
149#endif /* CONFIG_MIPS_MT_SMP */ 141#endif /* CONFIG_MIPS_MT_SMP */
150#endif /* CONFIG_MIPS_MT */ 142#endif /* CONFIG_MIPS_MT */
151 /* setup the cascaded interrupts */ 143 /* setup the cascaded interrupts */
@@ -153,8 +145,10 @@ void __init arch_init_irq(void)
153 setup_irq(MSP_INT_PER, &per_cascade_msp); 145 setup_irq(MSP_INT_PER, &per_cascade_msp);
154 146
155#else 147#else
156 /* setup the 2nd-level SLP register based interrupt controller */ 148 /*
157 /* VSMP /SMTC support support is not enabled for SLP */ 149 * Setup the 2nd-level SLP register based interrupt controller.
150 * VSMP support support is not enabled for SLP.
151 */
158 msp_slp_irq_init(); 152 msp_slp_irq_init();
159 153
160 /* setup the cascaded SLP/PER interrupts */ 154 /* setup the cascaded SLP/PER interrupts */
diff --git a/arch/mips/pmcs-msp71xx/msp_irq_cic.c b/arch/mips/pmcs-msp71xx/msp_irq_cic.c
index e49b499f66db..b8df2f7b3328 100644
--- a/arch/mips/pmcs-msp71xx/msp_irq_cic.c
+++ b/arch/mips/pmcs-msp71xx/msp_irq_cic.c
@@ -120,10 +120,9 @@ static void msp_cic_irq_ack(struct irq_data *d)
120 * hurt for the others 120 * hurt for the others
121 */ 121 */
122 *CIC_STS_REG = (1 << (d->irq - MSP_CIC_INTBASE)); 122 *CIC_STS_REG = (1 << (d->irq - MSP_CIC_INTBASE));
123 smtc_im_ack_irq(d->irq);
124} 123}
125 124
126/*Note: Limiting to VSMP . Not tested in SMTC */ 125/* Note: Limiting to VSMP. */
127 126
128#ifdef CONFIG_MIPS_MT_SMP 127#ifdef CONFIG_MIPS_MT_SMP
129static int msp_cic_irq_set_affinity(struct irq_data *d, 128static int msp_cic_irq_set_affinity(struct irq_data *d,
@@ -183,10 +182,6 @@ void __init msp_cic_irq_init(void)
183 for (i = MSP_CIC_INTBASE ; i < MSP_CIC_INTBASE + 32 ; i++) { 182 for (i = MSP_CIC_INTBASE ; i < MSP_CIC_INTBASE + 32 ; i++) {
184 irq_set_chip_and_handler(i, &msp_cic_irq_controller, 183 irq_set_chip_and_handler(i, &msp_cic_irq_controller,
185 handle_level_irq); 184 handle_level_irq);
186#ifdef CONFIG_MIPS_MT_SMTC
187 /* Mask of CIC interrupt */
188 irq_hwmask[i] = C_IRQ4;
189#endif
190 } 185 }
191 186
192 /* Initialize the PER interrupt sub-system */ 187 /* Initialize the PER interrupt sub-system */
diff --git a/arch/mips/pmcs-msp71xx/msp_irq_per.c b/arch/mips/pmcs-msp71xx/msp_irq_per.c
index d1fd530479d4..a111836bcec2 100644
--- a/arch/mips/pmcs-msp71xx/msp_irq_per.c
+++ b/arch/mips/pmcs-msp71xx/msp_irq_per.c
@@ -113,9 +113,6 @@ void __init msp_per_irq_init(void)
113 /* initialize all the IRQ descriptors */ 113 /* initialize all the IRQ descriptors */
114 for (i = MSP_PER_INTBASE; i < MSP_PER_INTBASE + 32; i++) { 114 for (i = MSP_PER_INTBASE; i < MSP_PER_INTBASE + 32; i++) {
115 irq_set_chip(i, &msp_per_irq_controller); 115 irq_set_chip(i, &msp_per_irq_controller);
116#ifdef CONFIG_MIPS_MT_SMTC
117 irq_hwmask[i] = C_IRQ4;
118#endif
119 } 116 }
120} 117}
121 118
diff --git a/arch/mips/pmcs-msp71xx/msp_setup.c b/arch/mips/pmcs-msp71xx/msp_setup.c
index ba9d518dc624..4f925e06c414 100644
--- a/arch/mips/pmcs-msp71xx/msp_setup.c
+++ b/arch/mips/pmcs-msp71xx/msp_setup.c
@@ -147,8 +147,6 @@ void __init plat_mem_setup(void)
147 pm_power_off = msp_power_off; 147 pm_power_off = msp_power_off;
148} 148}
149 149
150extern struct plat_smp_ops msp_smtc_smp_ops;
151
152void __init prom_init(void) 150void __init prom_init(void)
153{ 151{
154 unsigned long family; 152 unsigned long family;
@@ -229,9 +227,5 @@ void __init prom_init(void)
229 */ 227 */
230 msp_serial_setup(); 228 msp_serial_setup();
231 229
232 if (register_vsmp_smp_ops()) { 230 register_vsmp_smp_ops();
233#ifdef CONFIG_MIPS_MT_SMTC
234 register_smp_ops(&msp_smtc_smp_ops);
235#endif
236 }
237} 231}
diff --git a/arch/mips/pmcs-msp71xx/msp_smtc.c b/arch/mips/pmcs-msp71xx/msp_smtc.c
deleted file mode 100644
index 6b5607fce279..000000000000
--- a/arch/mips/pmcs-msp71xx/msp_smtc.c
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * MSP71xx Platform-specific hooks for SMP operation
3 */
4#include <linux/irq.h>
5#include <linux/init.h>
6
7#include <asm/mipsmtregs.h>
8#include <asm/mipsregs.h>
9#include <asm/smtc.h>
10#include <asm/smtc_ipi.h>
11
12/* VPE/SMP Prototype implements platform interfaces directly */
13
14/*
15 * Cause the specified action to be performed on a targeted "CPU"
16 */
17
18static void msp_smtc_send_ipi_single(int cpu, unsigned int action)
19{
20 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
21 smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
22}
23
24static void msp_smtc_send_ipi_mask(const struct cpumask *mask,
25 unsigned int action)
26{
27 unsigned int i;
28
29 for_each_cpu(i, mask)
30 msp_smtc_send_ipi_single(i, action);
31}
32
33/*
34 * Post-config but pre-boot cleanup entry point
35 */
36static void msp_smtc_init_secondary(void)
37{
38 int myvpe;
39
40 /* Don't enable Malta I/O interrupts (IP2) for secondary VPEs */
41 myvpe = read_c0_tcbind() & TCBIND_CURVPE;
42 if (myvpe > 0)
43 change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 |
44 STATUSF_IP6 | STATUSF_IP7);
45 smtc_init_secondary();
46}
47
48/*
49 * Platform "CPU" startup hook
50 */
51static void msp_smtc_boot_secondary(int cpu, struct task_struct *idle)
52{
53 smtc_boot_secondary(cpu, idle);
54}
55
56/*
57 * SMP initialization finalization entry point
58 */
59static void msp_smtc_smp_finish(void)
60{
61 smtc_smp_finish();
62}
63
64/*
65 * Hook for after all CPUs are online
66 */
67
68static void msp_smtc_cpus_done(void)
69{
70}
71
72/*
73 * Platform SMP pre-initialization
74 *
75 * As noted above, we can assume a single CPU for now
76 * but it may be multithreaded.
77 */
78
79static void __init msp_smtc_smp_setup(void)
80{
81 /*
82 * we won't get the definitive value until
83 * we've run smtc_prepare_cpus later, but
84 */
85
86 if (read_c0_config3() & (1 << 2))
87 smp_num_siblings = smtc_build_cpu_map(0);
88}
89
90static void __init msp_smtc_prepare_cpus(unsigned int max_cpus)
91{
92 smtc_prepare_cpus(max_cpus);
93}
94
95struct plat_smp_ops msp_smtc_smp_ops = {
96 .send_ipi_single = msp_smtc_send_ipi_single,
97 .send_ipi_mask = msp_smtc_send_ipi_mask,
98 .init_secondary = msp_smtc_init_secondary,
99 .smp_finish = msp_smtc_smp_finish,
100 .cpus_done = msp_smtc_cpus_done,
101 .boot_secondary = msp_smtc_boot_secondary,
102 .smp_setup = msp_smtc_smp_setup,
103 .prepare_cpus = msp_smtc_prepare_cpus,
104};