aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv310
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pv310')
-rw-r--r--arch/arm/mach-s5pv310/cpu.c9
-rw-r--r--arch/arm/mach-s5pv310/include/mach/irqs.h13
-rw-r--r--arch/arm/mach-s5pv310/irq-combiner.c6
3 files changed, 24 insertions, 4 deletions
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index 7b6e066e2271..9900464082db 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -132,6 +132,15 @@ void __init s5pv310_init_irq(void)
132 gic_cpu_init(0, S5P_VA_GIC_CPU); 132 gic_cpu_init(0, S5P_VA_GIC_CPU);
133 133
134 for (irq = 0; irq < MAX_COMBINER_NR; irq++) { 134 for (irq = 0; irq < MAX_COMBINER_NR; irq++) {
135
136 /*
137 * From SPI(0) to SPI(39) and SPI(51), SPI(53) are
138 * connected to the interrupt combiner. These irqs
139 * should be initialized to support cascade interrupt.
140 */
141 if ((irq >= 40) && !(irq == 51) && !(irq == 53))
142 continue;
143
135 combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), 144 combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq),
136 COMBINER_IRQ(irq, 0)); 145 COMBINER_IRQ(irq, 0));
137 combiner_cascade_irq(irq, IRQ_SPI(irq)); 146 combiner_cascade_irq(irq, IRQ_SPI(irq));
diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h
index 99e7dad8a85a..f9a2830620d8 100644
--- a/arch/arm/mach-s5pv310/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
@@ -25,6 +25,8 @@
25 25
26#define IRQ_SPI(x) S5P_IRQ(x+32) 26#define IRQ_SPI(x) S5P_IRQ(x+32)
27 27
28#define IRQ_MCT1 IRQ_SPI(35)
29
28#define IRQ_EINT0 IRQ_SPI(40) 30#define IRQ_EINT0 IRQ_SPI(40)
29#define IRQ_EINT1 IRQ_SPI(41) 31#define IRQ_EINT1 IRQ_SPI(41)
30#define IRQ_EINT2 IRQ_SPI(42) 32#define IRQ_EINT2 IRQ_SPI(42)
@@ -36,9 +38,8 @@
36#define IRQ_JPEG IRQ_SPI(48) 38#define IRQ_JPEG IRQ_SPI(48)
37#define IRQ_2D IRQ_SPI(49) 39#define IRQ_2D IRQ_SPI(49)
38#define IRQ_PCIE IRQ_SPI(50) 40#define IRQ_PCIE IRQ_SPI(50)
39#define IRQ_SYSTEM_TIMER IRQ_SPI(51) 41#define IRQ_MCT0 IRQ_SPI(51)
40#define IRQ_MFC IRQ_SPI(52) 42#define IRQ_MFC IRQ_SPI(52)
41#define IRQ_WDT IRQ_SPI(53)
42#define IRQ_AUDIO_SS IRQ_SPI(54) 43#define IRQ_AUDIO_SS IRQ_SPI(54)
43#define IRQ_AC97 IRQ_SPI(55) 44#define IRQ_AC97 IRQ_SPI(55)
44#define IRQ_SPDIF IRQ_SPI(56) 45#define IRQ_SPDIF IRQ_SPI(56)
@@ -85,6 +86,8 @@
85 86
86#define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) 87#define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0)
87 88
89#define IRQ_MCT_L1 COMBINER_IRQ(35, 3)
90
88#define IRQ_EINT4 COMBINER_IRQ(37, 0) 91#define IRQ_EINT4 COMBINER_IRQ(37, 0)
89#define IRQ_EINT5 COMBINER_IRQ(37, 1) 92#define IRQ_EINT5 COMBINER_IRQ(37, 1)
90#define IRQ_EINT6 COMBINER_IRQ(37, 2) 93#define IRQ_EINT6 COMBINER_IRQ(37, 2)
@@ -101,7 +104,11 @@
101 104
102#define IRQ_EINT16_31 COMBINER_IRQ(39, 0) 105#define IRQ_EINT16_31 COMBINER_IRQ(39, 0)
103 106
104#define MAX_COMBINER_NR 40 107#define IRQ_MCT_L0 COMBINER_IRQ(51, 0)
108
109#define IRQ_WDT COMBINER_IRQ(53, 0)
110
111#define MAX_COMBINER_NR 54
105 112
106#define S5P_IRQ_EINT_BASE COMBINER_IRQ(MAX_COMBINER_NR, 0) 113#define S5P_IRQ_EINT_BASE COMBINER_IRQ(MAX_COMBINER_NR, 0)
107 114
diff --git a/arch/arm/mach-s5pv310/irq-combiner.c b/arch/arm/mach-s5pv310/irq-combiner.c
index c3f88c3faf6c..aad5c3d525d1 100644
--- a/arch/arm/mach-s5pv310/irq-combiner.c
+++ b/arch/arm/mach-s5pv310/irq-combiner.c
@@ -24,6 +24,7 @@ static DEFINE_SPINLOCK(irq_controller_lock);
24 24
25struct combiner_chip_data { 25struct combiner_chip_data {
26 unsigned int irq_offset; 26 unsigned int irq_offset;
27 unsigned int irq_mask;
27 void __iomem *base; 28 void __iomem *base;
28}; 29};
29 30
@@ -62,6 +63,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
62 spin_lock(&irq_controller_lock); 63 spin_lock(&irq_controller_lock);
63 status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); 64 status = __raw_readl(chip_data->base + COMBINER_INT_STATUS);
64 spin_unlock(&irq_controller_lock); 65 spin_unlock(&irq_controller_lock);
66 status &= chip_data->irq_mask;
65 67
66 if (status == 0) 68 if (status == 0)
67 goto out; 69 goto out;
@@ -104,10 +106,12 @@ void __init combiner_init(unsigned int combiner_nr, void __iomem *base,
104 106
105 combiner_data[combiner_nr].base = base; 107 combiner_data[combiner_nr].base = base;
106 combiner_data[combiner_nr].irq_offset = irq_start; 108 combiner_data[combiner_nr].irq_offset = irq_start;
109 combiner_data[combiner_nr].irq_mask = 0xff << ((combiner_nr % 4) << 3);
107 110
108 /* Disable all interrupts */ 111 /* Disable all interrupts */
109 112
110 __raw_writel(0xffffffff, base + COMBINER_ENABLE_CLEAR); 113 __raw_writel(combiner_data[combiner_nr].irq_mask,
114 base + COMBINER_ENABLE_CLEAR);
111 115
112 /* Setup the Linux IRQ subsystem */ 116 /* Setup the Linux IRQ subsystem */
113 117