aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/plat-arcfpga/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/plat-arcfpga/smp.c')
-rw-r--r--arch/arc/plat-arcfpga/smp.c18
1 files changed, 18 insertions, 0 deletions
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