aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-12-02 22:24:46 +0000
committerJonas Gorski <jogo@openwrt.org>2015-12-02 22:24:46 +0000
commite395433178224ff1e2a6053105d12936b46c7576 (patch)
tree6fd6e2bb8019d78d1b8a57d63516ebbe3cff47f6 /target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch
parent621677154f39f2e0b698a558b8b795db84a8e014 (diff)
downloadupstream-e395433178224ff1e2a6053105d12936b46c7576.tar.gz
upstream-e395433178224ff1e2a6053105d12936b46c7576.tar.bz2
upstream-e395433178224ff1e2a6053105d12936b46c7576.zip
brcm63xx: add linux 4.4 support
Only netboot tested. Flash at your own risk. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 47702
Diffstat (limited to 'target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch')
-rw-r--r--target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch b/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch
new file mode 100644
index 0000000000..2faf0dea29
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.4/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch
@@ -0,0 +1,34 @@
+From e55892aac9d5508a000647ca66f0e678e02be3bb Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sat, 21 Feb 2015 17:26:50 +0100
+Subject: [PATCH 5/6] MIPS: BCM63XX: do not register gpio-controller if
+present in dtb
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/bcm63xx/gpio.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/bcm63xx/gpio.c
++++ b/arch/mips/bcm63xx/gpio.c
+@@ -20,6 +20,8 @@
+ #include <bcm63xx_gpio.h>
+ #include <bcm63xx_regs.h>
+
++#include "boards/board_common.h"
++
+ /* for registering lookups; make them large enough to hold OF names */
+ static char *gpio_chip_labels[] = {
+ "xxxxxxxx.gpio-controller",
+@@ -50,8 +52,9 @@ static void __init bcm63xx_gpio_init_one
+ pdata.ngpio = ngpio;
+
+ sprintf(gpio_chip_labels[id], "bcm63xx-gpio.%d", id);
+- platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 2,
+- &pdata, sizeof(pdata));
++ if (!board_of_device_present("gpio0"))
++ platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res,
++ 2, &pdata, sizeof(pdata));
+ }
+
+ int __init bcm63xx_gpio_init(void)