summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-12 18:55:25 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-12 18:55:25 +0000
commitc2992ee273b4dac36df2a2b4a9d3a74d315f8f2e (patch)
tree64f14a7a43380f8fcc0403501b5fca11ab195147 /target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch
parent30cf6f5815b898f956ae95a88f28d327677a3f62 (diff)
downloadmtk-20170518-c2992ee273b4dac36df2a2b4a9d3a74d315f8f2e.zip
mtk-20170518-c2992ee273b4dac36df2a2b4a9d3a74d315f8f2e.tar.gz
mtk-20170518-c2992ee273b4dac36df2a2b4a9d3a74d315f8f2e.tar.bz2
brcm47xx: add new led and button support
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 39252
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch b/target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch
new file mode 100644
index 0000000..388eefa
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/101-bcma-gpio-fix-irq-handling.patch
@@ -0,0 +1,20 @@
+--- a/drivers/bcma/driver_gpio.c
++++ b/drivers/bcma/driver_gpio.c
+@@ -91,7 +91,9 @@ static void bcma_gpio_irq_unmask(struct
+ {
+ struct bcma_drv_cc *cc = irq_data_get_irq_chip_data(d);
+ int gpio = irqd_to_hwirq(d);
++ u32 val = bcma_chipco_gpio_in(cc, BIT(gpio));
+
++ bcma_chipco_gpio_polarity(cc, BIT(gpio), val);
+ bcma_chipco_gpio_intmask(cc, BIT(gpio), BIT(gpio));
+ }
+
+@@ -156,6 +158,7 @@ static int bcma_gpio_irq_domain_init(str
+ if (err)
+ goto err_req_irq;
+
++ bcma_chipco_gpio_intmask(cc, ~0, 0);
+ bcma_cc_set32(cc, BCMA_CC_IRQMASK, BCMA_CC_IRQ_GPIO);
+
+ return 0;