25 static unsigned int wake_enable;
28 .int_enable = SPSS_SIRC_INT_ENABLE,
29 .int_enable_clear = SPSS_SIRC_INT_ENABLE_CLEAR,
30 .int_enable_set = SPSS_SIRC_INT_ENABLE_SET,
31 .int_type = SPSS_SIRC_INT_TYPE,
32 .int_polarity = SPSS_SIRC_INT_POLARITY,
33 .int_clear = SPSS_SIRC_INT_CLEAR,
38 .int_status = SPSS_SIRC_IRQ_STATUS,
45 static void sirc_irq_mask(
struct irq_data *
d)
49 mask = 1 << (d->
irq - FIRST_SIRC_IRQ);
57 static void sirc_irq_unmask(
struct irq_data *
d)
61 mask = 1 << (d->
irq - FIRST_SIRC_IRQ);
67 static void sirc_irq_ack(
struct irq_data *
d)
71 mask = 1 << (d->
irq - FIRST_SIRC_IRQ);
76 static int sirc_irq_set_wake(
struct irq_data *
d,
unsigned int on)
81 mask = 1 << (d->
irq - FIRST_SIRC_IRQ);
90 static int sirc_irq_set_type(
struct irq_data *d,
unsigned int flow_type)
95 mask = 1 << (d->
irq - FIRST_SIRC_IRQ);
120 static void sirc_irq_handler(
unsigned int irq,
struct irq_desc *
desc)
122 unsigned int reg = 0;
136 (sirq < NR_SIRC_IRQS) && ((status & (1
U << sirq)) == 0);
144 static struct irq_chip sirc_irq_chip = {
146 .irq_ack = sirc_irq_ack,
147 .irq_mask = sirc_irq_mask,
148 .irq_unmask = sirc_irq_unmask,
149 .irq_set_wake = sirc_irq_set_wake,
150 .irq_set_type = sirc_irq_set_type,
160 for (i = FIRST_SIRC_IRQ; i < LAST_SIRC_IRQ; i++) {
165 for (i = 0; i <
ARRAY_SIZE(sirc_reg_table); i++) {
166 irq_set_chained_handler(sirc_reg_table[i].
cascade_irq,