diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 11:38:57 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 11:38:57 -0500 |
| commit | ecb50f0afd35a51ef487e8a54b976052eb03d729 (patch) | |
| tree | 27457f87d3dc2ce6c81e16d795f953e66c2fff45 /kernel | |
| parent | a157508c9790ccd1c8b5c6a828d6ba85bbe95aaa (diff) | |
| parent | 1655b0530d9502e69686220491ffb15ba0738c58 (diff) | |
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq core updates from Thomas Gleixner:
"This is the first (boring) part of irq updates:
- support for big endian I/O accessors in the generic irq chip
- cleanup of brcmstb/bcm7120 drivers so they can be reused for non
ARM SoCs
- the usual pile of fixes and updates for the various ARM irq chips"
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
irqchip: dw-apb-ictl: Add PM support
irqchip: dw-apb-ictl: Enable IRQ_GC_MASK_CACHE_PER_TYPE
irqchip: dw-apb-ictl: Always use use {readl|writel}_relaxed
ARM: orion: convert the irq_reg_{readl,writel} calls to the new API
irqchip: atmel-aic: Add missing entry for rm9200 irq fixups
irqchip: atmel-aic: Rename at91sam9_aic_irq_fixup for naming consistency
irqchip: atmel-aic: Add specific irq fixup function for sam9g45 and sam9rl
irqchip: atmel-aic: Add irq fixups for at91sam926x SoCs
irqchip: atmel-aic: Add irq fixup for RTT block
irqchip: brcmstb-l2: Convert driver to use irq_reg_{readl,writel}
irqchip: bcm7120-l2: Convert driver to use irq_reg_{readl,writel}
irqchip: bcm7120-l2: Decouple driver from brcmstb-l2
irqchip: bcm7120-l2: Extend driver to support 64+ bit controllers
irqchip: bcm7120-l2: Use gc->mask_cache to simplify suspend/resume functions
irqchip: bcm7120-l2: Fix missing nibble in gc->unused mask
irqchip: bcm7120-l2: Make sure all register accesses use base+offset
irqchip: bcm7120-l2, brcmstb-l2: Remove ARM Kconfig dependency
irqchip: bcm7120-l2: Eliminate bad IRQ check
irqchip: brcmstb-l2: Eliminate dependency on ARM code
genirq: Generic chip: Add big endian I/O accessors
...
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/irq/generic-chip.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c index cf80e7b0ddab..61024e8abdef 100644 --- a/kernel/irq/generic-chip.c +++ b/kernel/irq/generic-chip.c | |||
| @@ -39,7 +39,7 @@ void irq_gc_mask_disable_reg(struct irq_data *d) | |||
| 39 | u32 mask = d->mask; | 39 | u32 mask = d->mask; |
| 40 | 40 | ||
| 41 | irq_gc_lock(gc); | 41 | irq_gc_lock(gc); |
| 42 | irq_reg_writel(mask, gc->reg_base + ct->regs.disable); | 42 | irq_reg_writel(gc, mask, ct->regs.disable); |
| 43 | *ct->mask_cache &= ~mask; | 43 | *ct->mask_cache &= ~mask; |
| 44 | irq_gc_unlock(gc); | 44 | irq_gc_unlock(gc); |
| 45 | } | 45 | } |
| @@ -59,7 +59,7 @@ void irq_gc_mask_set_bit(struct irq_data *d) | |||
| 59 | 59 | ||
| 60 | irq_gc_lock(gc); | 60 | irq_gc_lock(gc); |
| 61 | *ct->mask_cache |= mask; | 61 | *ct->mask_cache |= mask; |
| 62 | irq_reg_writel(*ct->mask_cache, gc->reg_base + ct->regs.mask); | 62 | irq_reg_writel(gc, *ct->mask_cache, ct->regs.mask); |
| 63 | irq_gc_unlock(gc); | 63 | irq_gc_unlock(gc); |
| 64 | } | 64 | } |
| 65 | EXPORT_SYMBOL_GPL(irq_gc_mask_set_bit); | 65 | EXPORT_SYMBOL_GPL(irq_gc_mask_set_bit); |
| @@ -79,7 +79,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d) | |||
| 79 | 79 | ||
| 80 | irq_gc_lock(gc); | 80 | irq_gc_lock(gc); |
| 81 | *ct->mask_cache &= ~mask; | 81 | *ct->mask_cache &= ~mask; |
| 82 | irq_reg_writel(*ct->mask_cache, gc->reg_base + ct->regs.mask); | 82 | irq_reg_writel(gc, *ct->mask_cache, ct->regs.mask); |
| 83 | irq_gc_unlock(gc); | 83 | irq_gc_unlock(gc); |
| 84 | } | 84 | } |
| 85 | EXPORT_SYMBOL_GPL(irq_gc_mask_clr_bit); | 85 | EXPORT_SYMBOL_GPL(irq_gc_mask_clr_bit); |
| @@ -98,7 +98,7 @@ void irq_gc_unmask_enable_reg(struct irq_data *d) | |||
| 98 | u32 mask = d->mask; | 98 | u32 mask = d->mask; |
| 99 | 99 | ||
| 100 | irq_gc_lock(gc); | 100 | irq_gc_lock(gc); |
| 101 | irq_reg_writel(mask, gc->reg_base + ct->regs.enable); | 101 | irq_reg_writel(gc, mask, ct->regs.enable); |
| 102 | *ct->mask_cache |= mask; | 102 | *ct->mask_cache |= mask; |
| 103 | irq_gc_unlock(gc); | 103 | irq_gc_unlock(gc); |
| 104 | } | 104 | } |
| @@ -114,7 +114,7 @@ void irq_gc_ack_set_bit(struct irq_data *d) | |||
| 114 | u32 mask = d->mask; | 114 | u32 mask = d->mask; |
| 115 | 115 | ||
| 116 | irq_gc_lock(gc); | 116 | irq_gc_lock(gc); |
| 117 | irq_reg_writel(mask, gc->reg_base + ct->regs.ack); | 117 | irq_reg_writel(gc, mask, ct->regs.ack); |
| 118 | irq_gc_unlock(gc); | 118 | irq_gc_unlock(gc); |
| 119 | } | 119 | } |
| 120 | EXPORT_SYMBOL_GPL(irq_gc_ack_set_bit); | 120 | EXPORT_SYMBOL_GPL(irq_gc_ack_set_bit); |
| @@ -130,7 +130,7 @@ void irq_gc_ack_clr_bit(struct irq_data *d) | |||
| 130 | u32 mask = ~d->mask; | 130 | u32 mask = ~d->mask; |
| 131 | 131 | ||
| 132 | irq_gc_lock(gc); | 132 | irq_gc_lock(gc); |
| 133 | irq_reg_writel(mask, gc->reg_base + ct->regs.ack); | 133 | irq_reg_writel(gc, mask, ct->regs.ack); |
| 134 | irq_gc_unlock(gc); | 134 | irq_gc_unlock(gc); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| @@ -145,8 +145,8 @@ void irq_gc_mask_disable_reg_and_ack(struct irq_data *d) | |||
| 145 | u32 mask = d->mask; | 145 | u32 mask = d->mask; |
| 146 | 146 | ||
| 147 | irq_gc_lock(gc); | 147 | irq_gc_lock(gc); |
| 148 | irq_reg_writel(mask, gc->reg_base + ct->regs.mask); | 148 | irq_reg_writel(gc, mask, ct->regs.mask); |
| 149 | irq_reg_writel(mask, gc->reg_base + ct->regs.ack); | 149 | irq_reg_writel(gc, mask, ct->regs.ack); |
| 150 | irq_gc_unlock(gc); | 150 | irq_gc_unlock(gc); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| @@ -161,7 +161,7 @@ void irq_gc_eoi(struct irq_data *d) | |||
| 161 | u32 mask = d->mask; | 161 | u32 mask = d->mask; |
| 162 | 162 | ||
| 163 | irq_gc_lock(gc); | 163 | irq_gc_lock(gc); |
| 164 | irq_reg_writel(mask, gc->reg_base + ct->regs.eoi); | 164 | irq_reg_writel(gc, mask, ct->regs.eoi); |
| 165 | irq_gc_unlock(gc); | 165 | irq_gc_unlock(gc); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| @@ -191,6 +191,16 @@ int irq_gc_set_wake(struct irq_data *d, unsigned int on) | |||
| 191 | return 0; | 191 | return 0; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | static u32 irq_readl_be(void __iomem *addr) | ||
| 195 | { | ||
| 196 | return ioread32be(addr); | ||
| 197 | } | ||
| 198 | |||
| 199 | static void irq_writel_be(u32 val, void __iomem *addr) | ||
| 200 | { | ||
| 201 | iowrite32be(val, addr); | ||
| 202 | } | ||
| 203 | |||
| 194 | static void | 204 | static void |
| 195 | irq_init_generic_chip(struct irq_chip_generic *gc, const char *name, | 205 | irq_init_generic_chip(struct irq_chip_generic *gc, const char *name, |
| 196 | int num_ct, unsigned int irq_base, | 206 | int num_ct, unsigned int irq_base, |
| @@ -245,7 +255,7 @@ irq_gc_init_mask_cache(struct irq_chip_generic *gc, enum irq_gc_flags flags) | |||
| 245 | } | 255 | } |
| 246 | ct[i].mask_cache = mskptr; | 256 | ct[i].mask_cache = mskptr; |
| 247 | if (flags & IRQ_GC_INIT_MASK_CACHE) | 257 | if (flags & IRQ_GC_INIT_MASK_CACHE) |
| 248 | *mskptr = irq_reg_readl(gc->reg_base + mskreg); | 258 | *mskptr = irq_reg_readl(gc, mskreg); |
| 249 | } | 259 | } |
| 250 | } | 260 | } |
| 251 | 261 | ||
| @@ -300,7 +310,13 @@ int irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip, | |||
| 300 | dgc->gc[i] = gc = tmp; | 310 | dgc->gc[i] = gc = tmp; |
| 301 | irq_init_generic_chip(gc, name, num_ct, i * irqs_per_chip, | 311 | irq_init_generic_chip(gc, name, num_ct, i * irqs_per_chip, |
| 302 | NULL, handler); | 312 | NULL, handler); |
| 313 | |||
| 303 | gc->domain = d; | 314 | gc->domain = d; |
| 315 | if (gcflags & IRQ_GC_BE_IO) { | ||
| 316 | gc->reg_readl = &irq_readl_be; | ||
| 317 | gc->reg_writel = &irq_writel_be; | ||
| 318 | } | ||
| 319 | |||
| 304 | raw_spin_lock_irqsave(&gc_lock, flags); | 320 | raw_spin_lock_irqsave(&gc_lock, flags); |
| 305 | list_add_tail(&gc->list, &gc_list); | 321 | list_add_tail(&gc->list, &gc_list); |
| 306 | raw_spin_unlock_irqrestore(&gc_lock, flags); | 322 | raw_spin_unlock_irqrestore(&gc_lock, flags); |
