diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-03-16 13:37:38 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-03-16 13:37:38 +0000 |
commit | 343ec8d6452059e3f45f74acfc9ae26cae26446a (patch) | |
tree | dffec8cc466ac9b1a0bc7936bc866fa3cd5573fe /target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch | |
parent | e1a8e41287337b9cccd7758ee5d0372d6ebc3210 (diff) | |
download | upstream-343ec8d6452059e3f45f74acfc9ae26cae26446a.tar.gz upstream-343ec8d6452059e3f45f74acfc9ae26cae26446a.tar.bz2 upstream-343ec8d6452059e3f45f74acfc9ae26cae26446a.zip |
brcm63xx: use consistent gpio chip labeling for OF/non-OF
Ensure gpio chips are always labeled the same; this allows simplifying
any arch setup gpio lookups.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44846
Diffstat (limited to 'target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch b/target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch deleted file mode 100644 index 40f9e6dc7f..0000000000 --- a/target/linux/brcm63xx/patches-3.18/378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch +++ /dev/null @@ -1,44 +0,0 @@ -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: calculate labels for DT registered - controllers - - -Signed-off-by: Jonas Gorski <jogo@openwrt.org> ---- - arch/mips/bcm63xx/gpio.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 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", -@@ -49,9 +51,17 @@ static void __init bcm63xx_gpio_init_one - pdata.base = id * 32; - 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")) { -+ unsigned long base = res[0].start; -+ -+ if (base < 0xf0000000U) -+ base = CPHYSADDR(base); -+ sprintf(gpio_chip_labels[id], "%lx.gpio-controller", base); -+ } else { -+ sprintf(gpio_chip_labels[id], "bcm63xx-gpio.%d", id); -+ platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, -+ 2, &pdata, sizeof(pdata)); -+ } - } - - int __init bcm63xx_gpio_init(void) |