aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-04-21 16:17:46 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-04-21 16:17:46 +0000
commitbc2a7bfa703a0cc378b20570d861d7ce1ac7a1ed (patch)
treec299255f93a0be1a683be917b5123c5638bf60f3 /target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch
parent1570caeb752aafcfa4ca50c9526f85ce97c585c0 (diff)
downloadupstream-bc2a7bfa703a0cc378b20570d861d7ce1ac7a1ed.tar.gz
upstream-bc2a7bfa703a0cc378b20570d861d7ce1ac7a1ed.tar.bz2
upstream-bc2a7bfa703a0cc378b20570d861d7ce1ac7a1ed.zip
ixp4xx: remove 2.6.3{2,8} and 3.0 support
SVN-Revision: 31414
Diffstat (limited to 'target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch')
-rw-r--r--target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch137
1 files changed, 0 insertions, 137 deletions
diff --git a/target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch b/target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch
deleted file mode 100644
index d5adb0f1aa..0000000000
--- a/target/linux/ixp4xx/patches-3.0/402-ixp4xx_gpiolib.patch
+++ /dev/null
@@ -1,137 +0,0 @@
---- a/arch/arm/mach-ixp4xx/common.c
-+++ b/arch/arm/mach-ixp4xx/common.c
-@@ -36,6 +36,7 @@
- #include <asm/page.h>
- #include <asm/irq.h>
- #include <asm/sched_clock.h>
-+#include <asm/gpio.h>
-
- #include <asm/mach/map.h>
- #include <asm/mach/irq.h>
-@@ -375,12 +376,50 @@ static struct platform_device *ixp46x_de
- unsigned long ixp4xx_exp_bus_size;
- EXPORT_SYMBOL(ixp4xx_exp_bus_size);
-
-+static int ixp4xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
-+{
-+ gpio_line_config(gpio, IXP4XX_GPIO_IN);
-+ return 0;
-+}
-+
-+static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
-+{
-+ gpio_line_set(gpio, level);
-+ gpio_line_config(gpio, IXP4XX_GPIO_OUT);
-+ return 0;
-+}
-+
-+static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
-+{
-+ int value;
-+
-+ gpio_line_get(gpio, &value);
-+ return value;
-+}
-+
-+static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
-+{
-+ gpio_line_set(gpio, value);
-+}
-+
-+static struct gpio_chip ixp4xx_gpio_chip = {
-+ .label = "IXP4XX_GPIO_CHIP",
-+ .direction_input = ixp4xx_gpio_direction_input,
-+ .direction_output = ixp4xx_gpio_direction_output,
-+ .get = ixp4xx_gpio_get_value,
-+ .set = ixp4xx_gpio_set_value,
-+ .base = 0,
-+ .ngpio = 16,
-+};
-+
- void __init ixp4xx_sys_init(void)
- {
- ixp4xx_exp_bus_size = SZ_16M;
-
- platform_add_devices(ixp4xx_devices, ARRAY_SIZE(ixp4xx_devices));
-
-+ gpiochip_add(&ixp4xx_gpio_chip);
-+
- if (cpu_is_ixp46x()) {
- int region;
-
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -462,7 +462,7 @@ config ARCH_IXP4XX
- depends on MMU
- select CLKSRC_MMIO
- select CPU_XSCALE
-- select GENERIC_GPIO
-+ select ARCH_REQUIRE_GPIOLIB
- select GENERIC_CLOCKEVENTS
- select HAVE_SCHED_CLOCK
- select MIGHT_HAVE_PCI
---- a/arch/arm/mach-ixp4xx/include/mach/gpio.h
-+++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h
-@@ -27,47 +27,31 @@
-
- #include <linux/kernel.h>
- #include <mach/hardware.h>
-+#include <asm-generic/gpio.h> /* cansleep wrappers */
-
--static inline int gpio_request(unsigned gpio, const char *label)
--{
-- return 0;
--}
--
--static inline void gpio_free(unsigned gpio)
--{
-- might_sleep();
--
-- return;
--}
--
--static inline int gpio_direction_input(unsigned gpio)
--{
-- gpio_line_config(gpio, IXP4XX_GPIO_IN);
-- return 0;
--}
--
--static inline int gpio_direction_output(unsigned gpio, int level)
--{
-- gpio_line_set(gpio, level);
-- gpio_line_config(gpio, IXP4XX_GPIO_OUT);
-- return 0;
--}
-+#define NR_BUILTIN_GPIO 16
-
- static inline int gpio_get_value(unsigned gpio)
- {
-- int value;
--
-- gpio_line_get(gpio, &value);
--
-- return value;
-+ if (gpio < NR_BUILTIN_GPIO)
-+ {
-+ int value;
-+ gpio_line_get(gpio, &value);
-+ return value;
-+ }
-+ else
-+ return __gpio_get_value(gpio);
- }
-
- static inline void gpio_set_value(unsigned gpio, int value)
- {
-- gpio_line_set(gpio, value);
-+ if (gpio < NR_BUILTIN_GPIO)
-+ gpio_line_set(gpio, value);
-+ else
-+ __gpio_set_value(gpio, value);
- }
-
--#include <asm-generic/gpio.h> /* cansleep wrappers */
-+#define gpio_cansleep __gpio_cansleep
-
- extern int gpio_to_irq(int gpio);
- extern int irq_to_gpio(unsigned int irq);