23 #include <linux/types.h>
29 #define TXx9_IRCER_ICE 0x00000001
32 #define TXx9_IRCR_LOW 0x00000000
33 #define TXx9_IRCR_HIGH 0x00000001
34 #define TXx9_IRCR_DOWN 0x00000002
35 #define TXx9_IRCR_UP 0x00000003
36 #define TXx9_IRCR_EDGE(cr) ((cr) & 0x00000002)
39 #define TXx9_IRSCR_EIClrE 0x00000100
40 #define TXx9_IRSCR_EIClr_MASK 0x0000000f
43 #define TXx9_IRCSR_IF 0x00010000
53 static void tx4939_irq_unmask(
struct irq_data *
d)
65 ofs = (irq_nr & 16) + (irq_nr & 1) * 8;
67 | (tx4939irq[irq_nr].
level << ofs),
71 static inline void tx4939_irq_mask(
struct irq_data *d)
83 ofs = (irq_nr & 16) + (irq_nr & 1) * 8;
90 static void tx4939_irq_mask_ack(
struct irq_data *d)
104 static int tx4939_irq_set_type(
struct irq_data *d,
unsigned int flow_type)
137 ofs = (((irq_nr & 16) >> 1) | (irq_nr & (8 - 1))) * 2;
140 cr |= (mode & 0x3) << ofs;
142 tx4939irq[irq_nr].mode =
mode;
146 static struct irq_chip tx4939_irq_chip = {
148 .irq_ack = tx4939_irq_mask_ack,
149 .irq_mask = tx4939_irq_mask,
150 .irq_mask_ack = tx4939_irq_mask_ack,
151 .irq_unmask = tx4939_irq_unmask,
152 .irq_set_type = tx4939_irq_set_type,
155 static int tx4939_irq_set_pri(
int irc_irq,
int new_pri)
161 old_pri = tx4939irq[irc_irq].level;
162 tx4939irq[irc_irq].level = new_pri;
177 tx4939irq[
i].level = 4;
179 irq_set_chip_and_handler(
TXX9_IRQ_BASE + i, &tx4939_irq_chip,
185 for (i = 0; i < 16; i++)
188 for (i = 0; i < 2; i++)
190 for (i = 0; i < 2; i++)