aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-06-07 17:04:37 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-06-07 17:04:37 +0000
commit717e8b6f3c994ca6e13d02b9a175725e0e887b99 (patch)
tree9db889826450b8840e476013cd83af0839fcf3c2
parent1714048d7f8dcf01ba134a8c4cc414240da1c40d (diff)
downloadupstream-717e8b6f3c994ca6e13d02b9a175725e0e887b99.tar.gz
upstream-717e8b6f3c994ca6e13d02b9a175725e0e887b99.tar.bz2
upstream-717e8b6f3c994ca6e13d02b9a175725e0e887b99.zip
brcm47xx: remove old gpio and nvram interfaces
These were only used by broadcom-diag any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 41048
-rw-r--r--target/linux/brcm47xx/patches-3.10/400-arch-bcm47xx.patch176
-rw-r--r--target/linux/brcm47xx/patches-3.10/820-wgt634u-nvram-fix.patch14
2 files changed, 2 insertions, 188 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-3.10/400-arch-bcm47xx.patch
deleted file mode 100644
index 43aeaf152e..0000000000
--- a/target/linux/brcm47xx/patches-3.10/400-arch-bcm47xx.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -210,3 +210,30 @@ int bcm47xx_nvram_gpio_pin(const char *n
- return -ENOENT;
- }
- EXPORT_SYMBOL(bcm47xx_nvram_gpio_pin);
-+
-+char *nvram_get(const char *name)
-+{
-+ char *var, *value, *end, *eq;
-+
-+ if (!name)
-+ return NULL;
-+
-+ if (!nvram_buf[0])
-+ nvram_init();
-+
-+ /* Look for name=value and return value */
-+ var = &nvram_buf[sizeof(struct nvram_header)];
-+ end = nvram_buf + sizeof(nvram_buf) - 2;
-+ end[0] = end[1] = '\0';
-+ for (; *var; var = value + strlen(value) + 1) {
-+ eq = strchr(var, '=');
-+ if (!eq)
-+ break;
-+ value = eq + 1;
-+ if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
-+ return value;
-+ }
-+
-+ return NULL;
-+}
-+EXPORT_SYMBOL(nvram_get);
---- a/arch/mips/bcm47xx/Makefile
-+++ b/arch/mips/bcm47xx/Makefile
-@@ -5,3 +5,4 @@
-
- obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
- obj-y += board.o buttons.o leds.o workarounds.o
-+obj-y += gpio.o
---- /dev/null
-+++ b/arch/mips/bcm47xx/gpio.c
-@@ -0,0 +1,119 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2007 Aurelien Jarno <aurelien@aurel32.net>
-+ * Copyright (C) 2012 Hauke Mehrtens <hauke@hauke-m.de>
-+ *
-+ * Parts of this file are based on Atheros AR71XX/AR724X/AR913X GPIO
-+ */
-+
-+#include <linux/export.h>
-+#include <linux/gpio.h>
-+#include <linux/ssb/ssb_embedded.h>
-+#include <linux/bcma/bcma.h>
-+
-+#include <bcm47xx.h>
-+
-+/* low level BCM47xx gpio api */
-+u32 bcm47xx_gpio_in(u32 mask)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_in(&bcm47xx_bus.ssb, mask);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_in(&bcm47xx_bus.bcma.bus.drv_cc, mask);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_in);
-+
-+u32 bcm47xx_gpio_out(u32 mask, u32 value)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_out(&bcm47xx_bus.ssb, mask, value);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_out(&bcm47xx_bus.bcma.bus.drv_cc, mask,
-+ value);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_out);
-+
-+u32 bcm47xx_gpio_outen(u32 mask, u32 value)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_outen(&bcm47xx_bus.ssb, mask, value);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_outen(&bcm47xx_bus.bcma.bus.drv_cc,
-+ mask, value);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_outen);
-+
-+u32 bcm47xx_gpio_control(u32 mask, u32 value)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_control(&bcm47xx_bus.ssb, mask, value);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_control(&bcm47xx_bus.bcma.bus.drv_cc,
-+ mask, value);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_control);
-+
-+u32 bcm47xx_gpio_intmask(u32 mask, u32 value)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_intmask(&bcm47xx_bus.ssb, mask, value);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_intmask(&bcm47xx_bus.bcma.bus.drv_cc,
-+ mask, value);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_intmask);
-+
-+u32 bcm47xx_gpio_polarity(u32 mask, u32 value)
-+{
-+ switch (bcm47xx_bus_type) {
-+#ifdef CONFIG_BCM47XX_SSB
-+ case BCM47XX_BUS_TYPE_SSB:
-+ return ssb_gpio_polarity(&bcm47xx_bus.ssb, mask, value);
-+#endif
-+#ifdef CONFIG_BCM47XX_BCMA
-+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_chipco_gpio_polarity(&bcm47xx_bus.bcma.bus.drv_cc,
-+ mask, value);
-+#endif
-+ }
-+ return -EINVAL;
-+}
-+EXPORT_SYMBOL(bcm47xx_gpio_polarity);
---- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
-@@ -14,4 +14,11 @@ static inline int irq_to_gpio(unsigned i
- return -EINVAL;
- }
-
-+u32 bcm47xx_gpio_in(u32 mask);
-+u32 bcm47xx_gpio_out(u32 mask, u32 value);
-+u32 bcm47xx_gpio_outen(u32 mask, u32 value);
-+u32 bcm47xx_gpio_control(u32 mask, u32 value);
-+u32 bcm47xx_gpio_intmask(u32 mask, u32 value);
-+u32 bcm47xx_gpio_polarity(u32 mask, u32 value);
-+
- #endif
diff --git a/target/linux/brcm47xx/patches-3.10/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.10/820-wgt634u-nvram-fix.patch
index 4cf6ee0832..f666cf36ca 100644
--- a/target/linux/brcm47xx/patches-3.10/820-wgt634u-nvram-fix.patch
+++ b/target/linux/brcm47xx/patches-3.10/820-wgt634u-nvram-fix.patch
@@ -5,10 +5,10 @@ out the configuration than the in kernel cfe config reader.
--- a/arch/mips/bcm47xx/Makefile
+++ b/arch/mips/bcm47xx/Makefile
-@@ -6,3 +6,4 @@
+@@ -5,3 +5,4 @@
+
obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
obj-y += board.o buttons.o leds.o workarounds.o
- obj-y += gpio.o
+obj-y += cfe_env.o
--- /dev/null
+++ b/arch/mips/bcm47xx/cfe_env.c
@@ -294,13 +294,3 @@ out the configuration than the in kernel cfe config reader.
/* Look for name=value and return value */
var = &nvram_buf[sizeof(struct nvram_header)];
end = nvram_buf + sizeof(nvram_buf) - 2;
-@@ -221,6 +250,9 @@ char *nvram_get(const char *name)
- if (!nvram_buf[0])
- nvram_init();
-
-+ if (cfe_env)
-+ return cfe_env_get(nvram_buf, name);
-+
- /* Look for name=value and return value */
- var = &nvram_buf[sizeof(struct nvram_header)];
- end = nvram_buf + sizeof(nvram_buf) - 2;