]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: 7043/1: mach-ixp2000: rename GPIO header
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 22 Aug 2011 07:44:18 +0000 (08:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 22 Aug 2011 08:13:21 +0000 (09:13 +0100)
The ixp2000 abuses the <mach/gpio.h> namespace by not implementing
any generic GPIO nor gpiolib functions in it - just custom GPIO.
Rename the header to <mach/gpio-ixp2000.h> for clarity.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h [new file with mode: 0644]
arch/arm/mach-ixp2000/include/mach/gpio.h [deleted file]
arch/arm/mach-ixp2000/ixdp2x00.c
drivers/i2c/busses/i2c-ixp2000.c

index e95c5e74238deaecd03f149bafbb7951cc21ed9d..59a512672bb9de9035b6e695c7e1e914bc7eb3c4 100644 (file)
@@ -39,6 +39,8 @@
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 
+#include <mach/gpio-ixp2000.h>
+
 static DEFINE_SPINLOCK(ixp2000_slowport_lock);
 static unsigned long ixp2000_slowport_irq_flags;
 
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h
new file mode 100644 (file)
index 0000000..af836c7
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * arch/arm/mach-ixp2000/include/mach/gpio.h
+ *
+ * Copyright (C) 2002 Intel Corporation.
+ *
+ * This program is free software, you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * IXP2000 GPIO in/out, edge/level detection for IRQs:
+ * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
+ * or both Falling-edge and Rising-edge.
+ * This must be called *before* the corresponding IRQ is registerd.
+ * Use this instead of directly setting the GPIO registers.
+ * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
+ */
+#ifndef __ASM_ARCH_GPIO_H
+#define __ASM_ARCH_GPIO_H
+
+#ifndef __ASSEMBLY__
+
+#define GPIO_IN                                0
+#define GPIO_OUT                       1
+
+#define IXP2000_GPIO_LOW               0
+#define IXP2000_GPIO_HIGH              1
+
+extern void gpio_line_config(int line, int direction);
+
+static inline int gpio_line_get(int line)
+{
+       return (((*IXP2000_GPIO_PLR) >> line) & 1);
+}
+
+static inline void gpio_line_set(int line, int value)
+{
+       if (value == IXP2000_GPIO_HIGH) {
+               ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
+       } else if (value == IXP2000_GPIO_LOW) {
+               ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
+       }
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio.h b/arch/arm/mach-ixp2000/include/mach/gpio.h
deleted file mode 100644 (file)
index 4a88d2c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * arch/arm/mach-ixp2000/include/mach/gpio.h
- *
- * Copyright (C) 2002 Intel Corporation.
- *
- * This program is free software, you can redistribute it and/or modify 
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-/*
- * IXP2000 GPIO in/out, edge/level detection for IRQs:
- * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
- * or both Falling-edge and Rising-edge.  
- * This must be called *before* the corresponding IRQ is registerd.
- * Use this instead of directly setting the GPIO registers.
- * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
- */
-#ifndef __ASM_ARCH_GPIO_H
-#define __ASM_ARCH_GPIO_H
-
-#ifndef __ASSEMBLY__
-
-#define GPIO_IN                                0
-#define GPIO_OUT                       1
-
-#define IXP2000_GPIO_LOW               0
-#define IXP2000_GPIO_HIGH              1
-
-extern void gpio_line_config(int line, int direction);
-
-static inline int gpio_line_get(int line)
-{
-       return (((*IXP2000_GPIO_PLR) >> line) & 1);
-}
-
-static inline void gpio_line_set(int line, int value)
-{
-       if (value == IXP2000_GPIO_HIGH) {
-               ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
-       } else if (value == IXP2000_GPIO_LOW) {
-               ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
-       }
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
index f61506822ad8b1b310de3ae549aa0f0eb13f793b..634b6c852f68f58d0d8cf368e45cf0946b0987a7 100644 (file)
@@ -41,6 +41,7 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/arch.h>
 
+#include <mach/gpio-ixp2000.h>
 
 /*************************************************************************
  * IXDP2x00 IRQ Initialization
index be9991bc2a74ceca07bc0c19c866d4e6665a5bde..c01e9519f6c15ee5df4e8cb32ae44ae234f57482 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/slab.h>
 
 #include <mach/hardware.h>     /* Pick up IXP2000-specific bits */
-#include <asm/gpio.h>
+#include <mach/gpio-ixp2000.h>
 
 static inline int ixp2000_scl_pin(void *data)
 {