11 #include <linux/module.h>
14 #include <asm/addrspace.h>
18 static struct bcsr_reg {
24 static int bcsr_csc_base;
33 bcsr_virt = (
void __iomem *)bcsr1_phys;
37 bcsr_regs[
i].raddr = (
void __iomem *)bcsr2_phys +
40 bcsr_regs[
i].raddr = (
void __iomem *)bcsr1_phys +
54 spin_unlock_irqrestore(&bcsr_regs[reg].lock, flags);
66 spin_unlock_irqrestore(&bcsr_regs[reg].lock, flags);
81 spin_unlock_irqrestore(&bcsr_regs[reg].lock, flags);
88 static void bcsr_csc_handler(
unsigned int irq,
struct irq_desc *
d)
97 static void bcsr_irq_mask(
struct irq_data *d)
99 unsigned short v = 1 << (d->
irq - bcsr_csc_base);
104 static void bcsr_irq_maskack(
struct irq_data *d)
106 unsigned short v = 1 << (d->
irq - bcsr_csc_base);
112 static void bcsr_irq_unmask(
struct irq_data *d)
114 unsigned short v = 1 << (d->
irq - bcsr_csc_base);
119 static struct irq_chip bcsr_irq_type = {
121 .irq_mask = bcsr_irq_mask,
122 .irq_mask_ack = bcsr_irq_maskack,
123 .irq_unmask = bcsr_irq_unmask,
136 bcsr_csc_base = csc_start;
138 for (irq = csc_start; irq <= csc_end; irq++)
142 irq_set_chained_handler(hook_irq, bcsr_csc_handler);