Lines Matching refs:n
13 #define LS1X_INTC_REG(n, x) \ argument
14 ((void __iomem *)KSEG1ADDR(LS1X_INTC_BASE + (n * 0x18) + (x)))
16 #define LS1X_INTC_INTISR(n) LS1X_INTC_REG(n, 0x0) argument
17 #define LS1X_INTC_INTIEN(n) LS1X_INTC_REG(n, 0x4) argument
18 #define LS1X_INTC_INTSET(n) LS1X_INTC_REG(n, 0x8) argument
19 #define LS1X_INTC_INTCLR(n) LS1X_INTC_REG(n, 0xc) argument
20 #define LS1X_INTC_INTPOL(n) LS1X_INTC_REG(n, 0x10) argument
21 #define LS1X_INTC_INTEDGE(n) LS1X_INTC_REG(n, 0x14) argument
26 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5; in ls1x_irq_ack() local
28 __raw_writel(__raw_readl(LS1X_INTC_INTCLR(n)) in ls1x_irq_ack()
29 | (1 << bit), LS1X_INTC_INTCLR(n)); in ls1x_irq_ack()
35 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5; in ls1x_irq_mask() local
37 __raw_writel(__raw_readl(LS1X_INTC_INTIEN(n)) in ls1x_irq_mask()
38 & ~(1 << bit), LS1X_INTC_INTIEN(n)); in ls1x_irq_mask()
44 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5; in ls1x_irq_mask_ack() local
46 __raw_writel(__raw_readl(LS1X_INTC_INTIEN(n)) in ls1x_irq_mask_ack()
47 & ~(1 << bit), LS1X_INTC_INTIEN(n)); in ls1x_irq_mask_ack()
48 __raw_writel(__raw_readl(LS1X_INTC_INTCLR(n)) in ls1x_irq_mask_ack()
49 | (1 << bit), LS1X_INTC_INTCLR(n)); in ls1x_irq_mask_ack()
55 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5; in ls1x_irq_unmask() local
57 __raw_writel(__raw_readl(LS1X_INTC_INTIEN(n)) in ls1x_irq_unmask()
58 | (1 << bit), LS1X_INTC_INTIEN(n)); in ls1x_irq_unmask()
64 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5; in ls1x_irq_settype() local
68 __raw_writel(__raw_readl(LS1X_INTC_INTPOL(n)) in ls1x_irq_settype()
69 | (1 << bit), LS1X_INTC_INTPOL(n)); in ls1x_irq_settype()
70 __raw_writel(__raw_readl(LS1X_INTC_INTEDGE(n)) in ls1x_irq_settype()
71 & ~(1 << bit), LS1X_INTC_INTEDGE(n)); in ls1x_irq_settype()
74 __raw_writel(__raw_readl(LS1X_INTC_INTPOL(n)) in ls1x_irq_settype()
75 & ~(1 << bit), LS1X_INTC_INTPOL(n)); in ls1x_irq_settype()
76 __raw_writel(__raw_readl(LS1X_INTC_INTEDGE(n)) in ls1x_irq_settype()
77 & ~(1 << bit), LS1X_INTC_INTEDGE(n)); in ls1x_irq_settype()
80 __raw_writel(__raw_readl(LS1X_INTC_INTPOL(n)) in ls1x_irq_settype()
81 | (1 << bit), LS1X_INTC_INTPOL(n)); in ls1x_irq_settype()
82 __raw_writel(__raw_readl(LS1X_INTC_INTEDGE(n)) in ls1x_irq_settype()
83 | (1 << bit), LS1X_INTC_INTEDGE(n)); in ls1x_irq_settype()
86 __raw_writel(__raw_readl(LS1X_INTC_INTPOL(n)) in ls1x_irq_settype()
87 & ~(1 << bit), LS1X_INTC_INTPOL(n)); in ls1x_irq_settype()
88 __raw_writel(__raw_readl(LS1X_INTC_INTEDGE(n)) in ls1x_irq_settype()
89 | (1 << bit), LS1X_INTC_INTEDGE(n)); in ls1x_irq_settype()
92 __raw_writel(__raw_readl(LS1X_INTC_INTPOL(n)) in ls1x_irq_settype()
93 & ~(1 << bit), LS1X_INTC_INTPOL(n)); in ls1x_irq_settype()
94 __raw_writel(__raw_readl(LS1X_INTC_INTEDGE(n)) in ls1x_irq_settype()
95 | (1 << bit), LS1X_INTC_INTEDGE(n)); in ls1x_irq_settype()
115 static void ls1x_irq_dispatch(int n) in ls1x_irq_dispatch() argument
120 int_status = __raw_readl(LS1X_INTC_INTISR(n)) & in ls1x_irq_dispatch()
121 __raw_readl(LS1X_INTC_INTIEN(n)); in ls1x_irq_dispatch()
124 irq = LS1X_IRQ(n, __ffs(int_status)); in ls1x_irq_dispatch()
154 int n; in ls1x_irq_init() local
159 for (n = 0; n < INTN; n++) { in ls1x_irq_init()
160 __raw_writel(0x0, LS1X_INTC_INTIEN(n)); in ls1x_irq_init()
161 __raw_writel(0xffffffff, LS1X_INTC_INTCLR(n)); in ls1x_irq_init()
162 __raw_writel(0xffffffff, LS1X_INTC_INTPOL(n)); in ls1x_irq_init()
164 __raw_writel(n ? 0x0 : 0xe000, LS1X_INTC_INTEDGE(n)); in ls1x_irq_init()
168 for (n = base; n < NR_IRQS; n++) { in ls1x_irq_init()
169 irq_set_chip_and_handler(n, &ls1x_irq_chip, in ls1x_irq_init()