11 #include <linux/kernel.h>
17 #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
21 static void disable_mappi_irq(
unsigned int irq)
30 static void enable_mappi_irq(
unsigned int irq)
41 disable_mappi_irq(data->
irq);
46 enable_mappi_irq(data->
irq);
57 static struct irq_chip mappi_irq_type =
60 .irq_shutdown = shutdown_mappi,
61 .irq_mask = mask_mappi,
62 .irq_unmask = unmask_mappi,
68 #define irq2pldirq(x) ((x) - M32700UT_PLD_IRQ_BASE)
69 #define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
70 (((x) - 1) * sizeof(unsigned short)))
78 static void disable_m32700ut_pld_irq(
unsigned int irq)
89 static void enable_m32700ut_pld_irq(
unsigned int irq)
102 disable_m32700ut_pld_irq(data->
irq);
107 enable_m32700ut_pld_irq(data->
irq);
111 static void shutdown_m32700ut_pld(
struct irq_data *
data)
121 static struct irq_chip m32700ut_pld_irq_type =
123 .name =
"USRV-PLD-IRQ",
124 .irq_shutdown = shutdown_m32700ut_pld,
125 .irq_mask = mask_m32700ut_pld,
126 .irq_unmask = unmask_m32700ut_pld,
145 #if defined(CONFIG_SERIAL_M32R_SIO)
172 for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) {
173 irq_set_chip_and_handler(PLD_IRQ_CF0 + i,
174 &m32700ut_pld_irq_type,
178 disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i);
181 #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
183 irq_set_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type,
187 disable_m32700ut_pld_irq(PLD_IRQ_UART0);
190 irq_set_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type,
194 disable_m32700ut_pld_irq(PLD_IRQ_UART1);
197 #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE)
199 irq_set_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type,
203 disable_m32700ut_pld_irq(PLD_IRQ_SNDINT);