diff options
| author | Olof Johansson <olof@lixom.net> | 2014-11-16 18:07:37 -0500 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-11-16 18:07:37 -0500 |
| commit | ae8f5041a5422016ae21d6f9d0bfa2caa839590f (patch) | |
| tree | e5af042f7f4ffaaab8682461c205e797ce7e7772 | |
| parent | 92c9e0c780e61f821ab8a08f0d4d4fd33ba1197c (diff) | |
| parent | 9ece8839b1277fb9128ff6833411614ab6c88d68 (diff) | |
Merge tag 'mvebu-fixes-3.18' of git://git.infradead.org/linux-mvebu into fixes
Merge "mvebu fixes for v3.18" from Jason Cooper:
- Armada XP
- Generalize i2c quirk
- orion
- Fix irq storm caused by specific sequence of request_irq
* tag 'mvebu-fixes-3.18' of git://git.infradead.org/linux-mvebu:
ARM: orion: Fix for certain sequence of request_irq can cause irq storm
ARM: mvebu: armada xp: Generalize use of i2c quirk
| -rw-r--r-- | arch/arm/mach-mvebu/board-v7.c | 2 | ||||
| -rw-r--r-- | arch/arm/plat-orion/gpio.c | 36 |
2 files changed, 33 insertions, 5 deletions
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 6478626e3ff6..d0d39f150fab 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c | |||
| @@ -188,7 +188,7 @@ static void __init thermal_quirk(void) | |||
| 188 | 188 | ||
| 189 | static void __init mvebu_dt_init(void) | 189 | static void __init mvebu_dt_init(void) |
| 190 | { | 190 | { |
| 191 | if (of_machine_is_compatible("plathome,openblocks-ax3-4")) | 191 | if (of_machine_is_compatible("marvell,armadaxp")) |
| 192 | i2c_quirk(); | 192 | i2c_quirk(); |
| 193 | if (of_machine_is_compatible("marvell,a375-db")) { | 193 | if (of_machine_is_compatible("marvell,a375-db")) { |
| 194 | external_abort_quirk(); | 194 | external_abort_quirk(); |
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index b61a3bcc2fa8..e048f6198d68 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
| @@ -497,6 +497,34 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
| 497 | #define orion_gpio_dbg_show NULL | 497 | #define orion_gpio_dbg_show NULL |
| 498 | #endif | 498 | #endif |
| 499 | 499 | ||
| 500 | static void orion_gpio_unmask_irq(struct irq_data *d) | ||
| 501 | { | ||
| 502 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
| 503 | struct irq_chip_type *ct = irq_data_get_chip_type(d); | ||
| 504 | u32 reg_val; | ||
| 505 | u32 mask = d->mask; | ||
| 506 | |||
| 507 | irq_gc_lock(gc); | ||
| 508 | reg_val = irq_reg_readl(gc->reg_base + ct->regs.mask); | ||
| 509 | reg_val |= mask; | ||
| 510 | irq_reg_writel(reg_val, gc->reg_base + ct->regs.mask); | ||
| 511 | irq_gc_unlock(gc); | ||
| 512 | } | ||
| 513 | |||
| 514 | static void orion_gpio_mask_irq(struct irq_data *d) | ||
| 515 | { | ||
| 516 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
| 517 | struct irq_chip_type *ct = irq_data_get_chip_type(d); | ||
| 518 | u32 mask = d->mask; | ||
| 519 | u32 reg_val; | ||
| 520 | |||
| 521 | irq_gc_lock(gc); | ||
| 522 | reg_val = irq_reg_readl(gc->reg_base + ct->regs.mask); | ||
| 523 | reg_val &= ~mask; | ||
| 524 | irq_reg_writel(reg_val, gc->reg_base + ct->regs.mask); | ||
| 525 | irq_gc_unlock(gc); | ||
| 526 | } | ||
| 527 | |||
| 500 | void __init orion_gpio_init(struct device_node *np, | 528 | void __init orion_gpio_init(struct device_node *np, |
| 501 | int gpio_base, int ngpio, | 529 | int gpio_base, int ngpio, |
| 502 | void __iomem *base, int mask_offset, | 530 | void __iomem *base, int mask_offset, |
| @@ -565,8 +593,8 @@ void __init orion_gpio_init(struct device_node *np, | |||
| 565 | ct = gc->chip_types; | 593 | ct = gc->chip_types; |
| 566 | ct->regs.mask = ochip->mask_offset + GPIO_LEVEL_MASK_OFF; | 594 | ct->regs.mask = ochip->mask_offset + GPIO_LEVEL_MASK_OFF; |
| 567 | ct->type = IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW; | 595 | ct->type = IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW; |
| 568 | ct->chip.irq_mask = irq_gc_mask_clr_bit; | 596 | ct->chip.irq_mask = orion_gpio_mask_irq; |
| 569 | ct->chip.irq_unmask = irq_gc_mask_set_bit; | 597 | ct->chip.irq_unmask = orion_gpio_unmask_irq; |
| 570 | ct->chip.irq_set_type = gpio_irq_set_type; | 598 | ct->chip.irq_set_type = gpio_irq_set_type; |
| 571 | ct->chip.name = ochip->chip.label; | 599 | ct->chip.name = ochip->chip.label; |
| 572 | 600 | ||
| @@ -575,8 +603,8 @@ void __init orion_gpio_init(struct device_node *np, | |||
| 575 | ct->regs.ack = GPIO_EDGE_CAUSE_OFF; | 603 | ct->regs.ack = GPIO_EDGE_CAUSE_OFF; |
| 576 | ct->type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; | 604 | ct->type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; |
| 577 | ct->chip.irq_ack = irq_gc_ack_clr_bit; | 605 | ct->chip.irq_ack = irq_gc_ack_clr_bit; |
| 578 | ct->chip.irq_mask = irq_gc_mask_clr_bit; | 606 | ct->chip.irq_mask = orion_gpio_mask_irq; |
| 579 | ct->chip.irq_unmask = irq_gc_mask_set_bit; | 607 | ct->chip.irq_unmask = orion_gpio_unmask_irq; |
| 580 | ct->chip.irq_set_type = gpio_irq_set_type; | 608 | ct->chip.irq_set_type = gpio_irq_set_type; |
| 581 | ct->handler = handle_edge_irq; | 609 | ct->handler = handle_edge_irq; |
| 582 | ct->chip.name = ochip->chip.label; | 610 | ct->chip.name = ochip->chip.label; |
