aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/emma/common/irq_emma2rh.c15
-rw-r--r--arch/mips/emma/markeins/irq.c4
2 files changed, 8 insertions, 11 deletions
diff --git a/arch/mips/emma/common/irq_emma2rh.c b/arch/mips/emma/common/irq_emma2rh.c
index 23ac959ce43c..4f84fede4c4c 100644
--- a/arch/mips/emma/common/irq_emma2rh.c
+++ b/arch/mips/emma/common/irq_emma2rh.c
@@ -41,19 +41,17 @@
41/* number of total irqs supported by EMMA2RH */ 41/* number of total irqs supported by EMMA2RH */
42#define NUM_EMMA2RH_IRQ 96 42#define NUM_EMMA2RH_IRQ 96
43 43
44static int emma2rh_irq_base = -1;
45
46void ll_emma2rh_irq_enable(int); 44void ll_emma2rh_irq_enable(int);
47void ll_emma2rh_irq_disable(int); 45void ll_emma2rh_irq_disable(int);
48 46
49static void emma2rh_irq_enable(unsigned int irq) 47static void emma2rh_irq_enable(unsigned int irq)
50{ 48{
51 ll_emma2rh_irq_enable(irq - emma2rh_irq_base); 49 ll_emma2rh_irq_enable(irq - EMMA2RH_IRQ_BASE);
52} 50}
53 51
54static void emma2rh_irq_disable(unsigned int irq) 52static void emma2rh_irq_disable(unsigned int irq)
55{ 53{
56 ll_emma2rh_irq_disable(irq - emma2rh_irq_base); 54 ll_emma2rh_irq_disable(irq - EMMA2RH_IRQ_BASE);
57} 55}
58 56
59struct irq_chip emma2rh_irq_controller = { 57struct irq_chip emma2rh_irq_controller = {
@@ -64,15 +62,14 @@ struct irq_chip emma2rh_irq_controller = {
64 .unmask = emma2rh_irq_enable, 62 .unmask = emma2rh_irq_enable,
65}; 63};
66 64
67void emma2rh_irq_init(u32 irq_base) 65void emma2rh_irq_init(void)
68{ 66{
69 u32 i; 67 u32 i;
70 68
71 for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ; i++) 69 for (i = 0; i < NUM_EMMA2RH_IRQ; i++)
72 set_irq_chip_and_handler(i, &emma2rh_irq_controller, 70 set_irq_chip_and_handler(EMMA2RH_IRQ_BASE + i,
71 &emma2rh_irq_controller,
73 handle_level_irq); 72 handle_level_irq);
74
75 emma2rh_irq_base = irq_base;
76} 73}
77 74
78void ll_emma2rh_irq_enable(int emma2rh_irq) 75void ll_emma2rh_irq_enable(int emma2rh_irq)
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c
index dcb939205be7..86b9b6a34f47 100644
--- a/arch/mips/emma/markeins/irq.c
+++ b/arch/mips/emma/markeins/irq.c
@@ -55,7 +55,7 @@
55 55
56extern void emma2rh_sw_irq_init(u32 base); 56extern void emma2rh_sw_irq_init(u32 base);
57extern void emma2rh_gpio_irq_init(u32 base); 57extern void emma2rh_gpio_irq_init(u32 base);
58extern void emma2rh_irq_init(u32 base); 58extern void emma2rh_irq_init(void);
59extern void emma2rh_irq_dispatch(void); 59extern void emma2rh_irq_dispatch(void);
60 60
61static struct irqaction irq_cascade = { 61static struct irqaction irq_cascade = {
@@ -102,7 +102,7 @@ void __init arch_init_irq(void)
102 emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~GPIO_PCI); 102 emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~GPIO_PCI);
103 103
104 /* init all controllers */ 104 /* init all controllers */
105 emma2rh_irq_init(EMMA2RH_IRQ_BASE); 105 emma2rh_irq_init();
106 emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE); 106 emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE);
107 emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE); 107 emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE);
108 mips_cpu_irq_init(); 108 mips_cpu_irq_init();