aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-02-28 03:13:44 -0500
committerVineet Gupta <vgupta@synopsys.com>2014-05-05 04:52:12 -0400
commit9a091d9e8450a4cec76bd208bbbb017a12795416 (patch)
tree8514ab63d65757e3827c90006fb3bf1c9b295e81 /arch/arc
parent89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (diff)
ARC: [SMP] ISS SMP extension bitrot
* Move extension specific code out of common SMP code * Don't enable it by default for SMP Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/irq.h2
-rw-r--r--arch/arc/kernel/irq.c18
-rw-r--r--arch/arc/plat-arcfpga/Makefile2
-rw-r--r--arch/arc/plat-arcfpga/platform.c4
-rw-r--r--arch/arc/plat-arcfpga/smp.c18
5 files changed, 21 insertions, 23 deletions
diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h
index 291a70db68b8..781f57f25bd8 100644
--- a/arch/arc/include/asm/irq.h
+++ b/arch/arc/include/asm/irq.h
@@ -19,8 +19,6 @@
19#include <asm-generic/irq.h> 19#include <asm-generic/irq.h>
20 20
21extern void arc_init_IRQ(void); 21extern void arc_init_IRQ(void);
22extern int get_hw_config_num_irq(void);
23
24void arc_local_timer_setup(unsigned int cpu); 22void arc_local_timer_setup(unsigned int cpu);
25 23
26#endif 24#endif
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index a4b141ee9a6a..7d653c0d0773 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -150,24 +150,6 @@ void arch_do_IRQ(unsigned int irq, struct pt_regs *regs)
150 set_irq_regs(old_regs); 150 set_irq_regs(old_regs);
151} 151}
152 152
153int get_hw_config_num_irq(void)
154{
155 uint32_t val = read_aux_reg(ARC_REG_VECBASE_BCR);
156
157 switch (val & 0x03) {
158 case 0:
159 return 16;
160 case 1:
161 return 32;
162 case 2:
163 return 8;
164 default:
165 return 0;
166 }
167
168 return 0;
169}
170
171/* 153/*
172 * arch_local_irq_enable - Enable interrupts. 154 * arch_local_irq_enable - Enable interrupts.
173 * 155 *
diff --git a/arch/arc/plat-arcfpga/Makefile b/arch/arc/plat-arcfpga/Makefile
index a44e22ebc1b7..4d1bddc34b5b 100644
--- a/arch/arc/plat-arcfpga/Makefile
+++ b/arch/arc/plat-arcfpga/Makefile
@@ -9,4 +9,4 @@
9KBUILD_CFLAGS += -Iarch/arc/plat-arcfpga/include 9KBUILD_CFLAGS += -Iarch/arc/plat-arcfpga/include
10 10
11obj-y := platform.o irq.o 11obj-y := platform.o irq.o
12obj-$(CONFIG_SMP) += smp.o 12obj-$(CONFIG_ISS_SMP_EXTN) += smp.o
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c
index 19b76b61f44b..213394a15cd2 100644
--- a/arch/arc/plat-arcfpga/platform.c
+++ b/arch/arc/plat-arcfpga/platform.c
@@ -169,7 +169,7 @@ static void __init plat_fpga_early_init(void)
169 169
170 arc_fpga_serial_init(); 170 arc_fpga_serial_init();
171 171
172#ifdef CONFIG_SMP 172#ifdef CONFIG_ISS_SMP_EXTN
173 iss_model_init_early_smp(); 173 iss_model_init_early_smp();
174#endif 174#endif
175} 175}
@@ -211,7 +211,7 @@ MACHINE_START(ANGEL4, "angel4")
211 .init_early = plat_fpga_early_init, 211 .init_early = plat_fpga_early_init,
212 .init_machine = plat_fpga_populate_dev, 212 .init_machine = plat_fpga_populate_dev,
213 .init_irq = plat_fpga_init_IRQ, 213 .init_irq = plat_fpga_init_IRQ,
214#ifdef CONFIG_SMP 214#ifdef CONFIG_ISS_SMP_EXTN
215 .init_smp = iss_model_init_smp, 215 .init_smp = iss_model_init_smp,
216#endif 216#endif
217MACHINE_END 217MACHINE_END
diff --git a/arch/arc/plat-arcfpga/smp.c b/arch/arc/plat-arcfpga/smp.c
index 8a12741f5f7a..92bad9122077 100644
--- a/arch/arc/plat-arcfpga/smp.c
+++ b/arch/arc/plat-arcfpga/smp.c
@@ -42,6 +42,24 @@ static void iss_model_smp_wakeup_cpu(int cpu, unsigned long pc)
42 42
43} 43}
44 44
45static inline int get_hw_config_num_irq(void)
46{
47 uint32_t val = read_aux_reg(ARC_REG_VECBASE_BCR);
48
49 switch (val & 0x03) {
50 case 0:
51 return 16;
52 case 1:
53 return 32;
54 case 2:
55 return 8;
56 default:
57 return 0;
58 }
59
60 return 0;
61}
62
45/* 63/*
46 * Any SMP specific init any CPU does when it comes up. 64 * Any SMP specific init any CPU does when it comes up.
47 * Here we setup the CPU to enable Inter-Processor-Interrupts 65 * Here we setup the CPU to enable Inter-Processor-Interrupts