diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-01-19 12:34:51 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-21 05:55:28 -0500 |
commit | efa63c6495fb6f83a1cc183f0df2617e383392e9 (patch) | |
tree | e6a8fcddca3223f0e386f1f1cabb6ec4abc34030 /arch | |
parent | 1f12681ab1419a68da0f066b95e3e6e9270eb730 (diff) |
m32r: Convert mappi2 irq chip
Convert the irq chips to the new functions and use proper flow
handlers. handle_level_irq is appropriate.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m32r/platforms/mappi2/setup.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/arch/m32r/platforms/mappi2/setup.c b/arch/m32r/platforms/mappi2/setup.c index 87bba1e01719..9117c30ea365 100644 --- a/arch/m32r/platforms/mappi2/setup.c +++ b/arch/m32r/platforms/mappi2/setup.c | |||
@@ -46,96 +46,97 @@ static void enable_mappi2_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_mappi2(unsigned int irq) | 49 | static void mask_mappi2(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_mappi2_irq(irq); | 51 | disable_mappi2_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_mappi2_irq(unsigned int irq) | 54 | static void unmask_mappi2(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_mappi2_irq(irq); | 56 | enable_mappi2_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_mappi2_irq(unsigned int irq) | 59 | static void shutdown_mappi2(struct irq_data *data) |
60 | { | ||
61 | enable_mappi2_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_mappi2_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip mappi2_irq_type = | 67 | static struct irq_chip mappi2_irq_type = |
74 | { | 68 | { |
75 | .name = "MAPPI2-IRQ", | 69 | .name = "MAPPI2-IRQ", |
76 | .startup = startup_mappi2_irq, | 70 | .irq_shutdown = shutdown_mappi2, |
77 | .shutdown = shutdown_mappi2_irq, | 71 | .irq_mask = mask_mappi2, |
78 | .enable = enable_mappi2_irq, | 72 | .irq_unmask = unmask_mappi2, |
79 | .disable = disable_mappi2_irq, | ||
80 | .ack = mask_and_ack_mappi2, | ||
81 | .end = end_mappi2_irq | ||
82 | }; | 73 | }; |
83 | 74 | ||
84 | void __init init_IRQ(void) | 75 | void __init init_IRQ(void) |
85 | { | 76 | { |
86 | #if defined(CONFIG_SMC91X) | 77 | #if defined(CONFIG_SMC91X) |
87 | /* INT0 : LAN controller (SMC91111) */ | 78 | /* INT0 : LAN controller (SMC91111) */ |
88 | set_irq_chip(M32R_IRQ_INT0, &mappi2_irq_type); | 79 | set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, |
80 | handle_level_irq); | ||
89 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 81 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
90 | disable_mappi2_irq(M32R_IRQ_INT0); | 82 | disable_mappi2_irq(M32R_IRQ_INT0); |
91 | #endif /* CONFIG_SMC91X */ | 83 | #endif /* CONFIG_SMC91X */ |
92 | 84 | ||
93 | /* MFT2 : system timer */ | 85 | /* MFT2 : system timer */ |
94 | set_irq_chip(M32R_IRQ_MFT2, &mappi2_irq_type); | 86 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, |
87 | handle_level_irq); | ||
95 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 88 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
96 | disable_mappi2_irq(M32R_IRQ_MFT2); | 89 | disable_mappi2_irq(M32R_IRQ_MFT2); |
97 | 90 | ||
98 | #ifdef CONFIG_SERIAL_M32R_SIO | 91 | #ifdef CONFIG_SERIAL_M32R_SIO |
99 | /* SIO0_R : uart receive data */ | 92 | /* SIO0_R : uart receive data */ |
100 | set_irq_chip(M32R_IRQ_SIO0_R, &mappi2_irq_type); | 93 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, |
94 | handle_level_irq); | ||
101 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 95 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
102 | disable_mappi2_irq(M32R_IRQ_SIO0_R); | 96 | disable_mappi2_irq(M32R_IRQ_SIO0_R); |
103 | 97 | ||
104 | /* SIO0_S : uart send data */ | 98 | /* SIO0_S : uart send data */ |
105 | set_irq_chip(M32R_IRQ_SIO0_S, &mappi2_irq_type); | 99 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, |
100 | handle_level_irq); | ||
106 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 101 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
107 | disable_mappi2_irq(M32R_IRQ_SIO0_S); | 102 | disable_mappi2_irq(M32R_IRQ_SIO0_S); |
108 | /* SIO1_R : uart receive data */ | 103 | /* SIO1_R : uart receive data */ |
109 | set_irq_chip(M32R_IRQ_SIO1_R, &mappi2_irq_type); | 104 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, |
105 | handle_level_irq); | ||
110 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 106 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
111 | disable_mappi2_irq(M32R_IRQ_SIO1_R); | 107 | disable_mappi2_irq(M32R_IRQ_SIO1_R); |
112 | 108 | ||
113 | /* SIO1_S : uart send data */ | 109 | /* SIO1_S : uart send data */ |
114 | set_irq_chip(M32R_IRQ_SIO1_S, &mappi2_irq_type); | 110 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, |
111 | handle_level_irq); | ||
115 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 112 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
116 | disable_mappi2_irq(M32R_IRQ_SIO1_S); | 113 | disable_mappi2_irq(M32R_IRQ_SIO1_S); |
117 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ | 114 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ |
118 | 115 | ||
119 | #if defined(CONFIG_USB) | 116 | #if defined(CONFIG_USB) |
120 | /* INT1 : USB Host controller interrupt */ | 117 | /* INT1 : USB Host controller interrupt */ |
121 | set_irq_chip(M32R_IRQ_INT1, &mappi2_irq_type); | 118 | set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, |
119 | handle_level_irq); | ||
122 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 120 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; |
123 | disable_mappi2_irq(M32R_IRQ_INT1); | 121 | disable_mappi2_irq(M32R_IRQ_INT1); |
124 | #endif /* CONFIG_USB */ | 122 | #endif /* CONFIG_USB */ |
125 | 123 | ||
126 | /* ICUCR40: CFC IREQ */ | 124 | /* ICUCR40: CFC IREQ */ |
127 | set_irq_chip(PLD_IRQ_CFIREQ, &mappi2_irq_type); | 125 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, |
126 | handle_level_irq); | ||
128 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 127 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; |
129 | disable_mappi2_irq(PLD_IRQ_CFIREQ); | 128 | disable_mappi2_irq(PLD_IRQ_CFIREQ); |
130 | 129 | ||
131 | #if defined(CONFIG_M32R_CFC) | 130 | #if defined(CONFIG_M32R_CFC) |
132 | /* ICUCR41: CFC Insert */ | 131 | /* ICUCR41: CFC Insert */ |
133 | set_irq_chip(PLD_IRQ_CFC_INSERT, &mappi2_irq_type); | 132 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, |
133 | handle_level_irq); | ||
134 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 134 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; |
135 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); | 135 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); |
136 | 136 | ||
137 | /* ICUCR42: CFC Eject */ | 137 | /* ICUCR42: CFC Eject */ |
138 | set_irq_chip(PLD_IRQ_CFC_EJECT, &mappi2_irq_type); | 138 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, |
139 | handle_level_irq); | ||
139 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 140 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
140 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); | 141 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); |
141 | #endif /* CONFIG_MAPPI2_CFC */ | 142 | #endif /* CONFIG_MAPPI2_CFC */ |