diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-03-05 11:57:58 -0500 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-05 11:58:11 -0500 |
| commit | 3a70b7e05f62d4e1bfd5744368ea1fd855b6e03c (patch) | |
| tree | 0a74b982ab63dd20433bfe6abefdc8dd1b7336b4 /arch/powerpc/sysdev/xilinx_intc.c | |
| parent | 7cb7f82611dddb4b471d42d0fad645dd0dc3f360 (diff) | |
| parent | 280ad7fda5f95211857fda38960f2b6fdf6edd3e (diff) | |
Merge branch 'depends/irqdomain' into next/drivers
This is needed in order for the tegra/soc-drivers branch
to work.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/powerpc/sysdev/xilinx_intc.c')
| -rw-r--r-- | arch/powerpc/sysdev/xilinx_intc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c index 6183799754af..8d73c3c0bee6 100644 --- a/arch/powerpc/sysdev/xilinx_intc.c +++ b/arch/powerpc/sysdev/xilinx_intc.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #define XINTC_IVR 24 /* Interrupt Vector */ | 40 | #define XINTC_IVR 24 /* Interrupt Vector */ |
| 41 | #define XINTC_MER 28 /* Master Enable */ | 41 | #define XINTC_MER 28 /* Master Enable */ |
| 42 | 42 | ||
| 43 | static struct irq_host *master_irqhost; | 43 | static struct irq_domain *master_irqhost; |
| 44 | 44 | ||
| 45 | #define XILINX_INTC_MAXIRQS (32) | 45 | #define XILINX_INTC_MAXIRQS (32) |
| 46 | 46 | ||
| @@ -141,7 +141,7 @@ static struct irq_chip xilinx_intc_edge_irqchip = { | |||
| 141 | /** | 141 | /** |
| 142 | * xilinx_intc_xlate - translate virq# from device tree interrupts property | 142 | * xilinx_intc_xlate - translate virq# from device tree interrupts property |
| 143 | */ | 143 | */ |
| 144 | static int xilinx_intc_xlate(struct irq_host *h, struct device_node *ct, | 144 | static int xilinx_intc_xlate(struct irq_domain *h, struct device_node *ct, |
| 145 | const u32 *intspec, unsigned int intsize, | 145 | const u32 *intspec, unsigned int intsize, |
| 146 | irq_hw_number_t *out_hwirq, | 146 | irq_hw_number_t *out_hwirq, |
| 147 | unsigned int *out_flags) | 147 | unsigned int *out_flags) |
| @@ -161,7 +161,7 @@ static int xilinx_intc_xlate(struct irq_host *h, struct device_node *ct, | |||
| 161 | 161 | ||
| 162 | return 0; | 162 | return 0; |
| 163 | } | 163 | } |
| 164 | static int xilinx_intc_map(struct irq_host *h, unsigned int virq, | 164 | static int xilinx_intc_map(struct irq_domain *h, unsigned int virq, |
| 165 | irq_hw_number_t irq) | 165 | irq_hw_number_t irq) |
| 166 | { | 166 | { |
| 167 | irq_set_chip_data(virq, h->host_data); | 167 | irq_set_chip_data(virq, h->host_data); |
| @@ -177,15 +177,15 @@ static int xilinx_intc_map(struct irq_host *h, unsigned int virq, | |||
| 177 | return 0; | 177 | return 0; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static struct irq_host_ops xilinx_intc_ops = { | 180 | static struct irq_domain_ops xilinx_intc_ops = { |
| 181 | .map = xilinx_intc_map, | 181 | .map = xilinx_intc_map, |
| 182 | .xlate = xilinx_intc_xlate, | 182 | .xlate = xilinx_intc_xlate, |
| 183 | }; | 183 | }; |
| 184 | 184 | ||
| 185 | struct irq_host * __init | 185 | struct irq_domain * __init |
| 186 | xilinx_intc_init(struct device_node *np) | 186 | xilinx_intc_init(struct device_node *np) |
| 187 | { | 187 | { |
| 188 | struct irq_host * irq; | 188 | struct irq_domain * irq; |
| 189 | void * regs; | 189 | void * regs; |
| 190 | 190 | ||
| 191 | /* Find and map the intc registers */ | 191 | /* Find and map the intc registers */ |
| @@ -200,12 +200,11 @@ xilinx_intc_init(struct device_node *np) | |||
| 200 | out_be32(regs + XINTC_IAR, ~(u32) 0); /* Acknowledge pending irqs */ | 200 | out_be32(regs + XINTC_IAR, ~(u32) 0); /* Acknowledge pending irqs */ |
| 201 | out_be32(regs + XINTC_MER, 0x3UL); /* Turn on the Master Enable. */ | 201 | out_be32(regs + XINTC_MER, 0x3UL); /* Turn on the Master Enable. */ |
| 202 | 202 | ||
| 203 | /* Allocate and initialize an irq_host structure. */ | 203 | /* Allocate and initialize an irq_domain structure. */ |
| 204 | irq = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, XILINX_INTC_MAXIRQS, | 204 | irq = irq_domain_add_linear(np, XILINX_INTC_MAXIRQS, &xilinx_intc_ops, |
| 205 | &xilinx_intc_ops, -1); | 205 | regs); |
| 206 | if (!irq) | 206 | if (!irq) |
| 207 | panic(__FILE__ ": Cannot allocate IRQ host\n"); | 207 | panic(__FILE__ ": Cannot allocate IRQ host\n"); |
| 208 | irq->host_data = regs; | ||
| 209 | 208 | ||
| 210 | return irq; | 209 | return irq; |
| 211 | } | 210 | } |
