* [PATCH] cleanup gpio includes
@ 2013-08-17 9:25 Sascha Hauer
2013-08-17 9:25 ` [PATCH 1/8] ARM: AT91: Add missing include Sascha Hauer
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
Several users include <mach/gpio.h> rather than <gpio.h>. Several
SoCs abuse the gpio headers for iomux stuff. Clean this up and
as a last step remove the need for <mach/gpio.h> for gpiolib users.
Sascha
----------------------------------------------------------------
Sascha Hauer (8):
ARM: AT91: Add missing include
ARM: include <gpio.h> instead of <mach/gpio.h>
ARM: i.MX23: Fix double include protection
ARM: AT91: move iomux definitions to iomux.h
ARM: MXS: move iomux definitions to iomux.h
ARM: Samsung: move iomux definitions to iomux.h
ARM: i.MX: move iomux definitions to iomux.h
ARM: remove include of mach/gpio.h for gpiolib users
arch/arm/boards/animeo_ip/init.c | 1 +
arch/arm/boards/at91rm9200ek/init.c | 3 +-
arch/arm/boards/at91sam9260ek/init.c | 1 +
arch/arm/boards/at91sam9261ek/init.c | 1 +
arch/arm/boards/at91sam9263ek/init.c | 1 +
arch/arm/boards/at91sam9m10g45ek/init.c | 3 +-
arch/arm/boards/at91sam9m10ihd/init.c | 1 +
arch/arm/boards/at91sam9n12ek/init.c | 1 +
arch/arm/boards/at91sam9x5ek/init.c | 1 +
arch/arm/boards/ccxmx51/ccxmx51.c | 1 -
arch/arm/boards/ccxmx51/ccxmx51js.c | 2 +-
arch/arm/boards/chumby_falconwing/falconwing.c | 1 +
arch/arm/boards/dss11/init.c | 1 +
arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 2 +-
arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c | 2 +-
arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 2 +-
arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c | 2 +-
arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 1 +
arch/arm/boards/freescale-mx25-3-stack/3stack.c | 2 +-
arch/arm/boards/freescale-mx28-evk/mx28-evk.c | 1 +
arch/arm/boards/freescale-mx35-3-stack/3stack.c | 2 +-
arch/arm/boards/freescale-mx51-pdk/board.c | 2 +-
arch/arm/boards/freescale-mx53-smd/board.c | 2 +-
arch/arm/boards/freescale-mx6-arm2/board.c | 2 +-
arch/arm/boards/freescale-mx6-sabrelite/board.c | 3 +-
arch/arm/boards/freescale-mx6-sabresd/board.c | 3 +-
arch/arm/boards/friendlyarm-mini2440/mini2440.c | 3 +-
arch/arm/boards/friendlyarm-mini6410/mini6410.c | 1 +
arch/arm/boards/friendlyarm-tiny210/tiny210.c | 1 +
.../friendlyarm-tiny6410/development-board.c | 1 +
arch/arm/boards/friendlyarm-tiny6410/tiny6410.c | 1 +
arch/arm/boards/guf-cupid/board.c | 2 +-
arch/arm/boards/guf-neso/board.c | 2 +-
arch/arm/boards/imx21ads/imx21ads.c | 2 +-
arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c | 1 +
arch/arm/boards/imx27ads/imx27ads.c | 2 +-
arch/arm/boards/karo-tx25/board.c | 2 +-
arch/arm/boards/karo-tx28/tx28-stk5.c | 1 +
arch/arm/boards/karo-tx28/tx28.c | 1 +
arch/arm/boards/karo-tx51/tx51.c | 2 +-
arch/arm/boards/karo-tx53/board.c | 2 +-
arch/arm/boards/mmccpu/init.c | 3 +-
arch/arm/boards/panda/board.c | 2 +-
arch/arm/boards/pcm037/pcm037.c | 2 +-
arch/arm/boards/pcm038/pcm038.c | 2 +-
arch/arm/boards/pcm038/pcm970.c | 2 +-
arch/arm/boards/pcm043/pcm043.c | 2 +-
arch/arm/boards/pcm049/board.c | 2 +-
arch/arm/boards/phycard-a-xl2/pca-a-xl2.c | 2 +-
arch/arm/boards/phycard-i.MX27/pca100.c | 2 +-
arch/arm/boards/pm9261/init.c | 3 +-
arch/arm/boards/pm9263/init.c | 3 +-
arch/arm/boards/pm9g45/init.c | 3 +-
arch/arm/boards/qil-a926x/init.c | 1 +
arch/arm/boards/sama5d3xek/init.c | 1 +
arch/arm/boards/scb9328/scb9328.c | 1 -
arch/arm/boards/telit-evk-pro3/init.c | 1 +
arch/arm/boards/tny-a926x/init.c | 1 +
arch/arm/boards/tqma53/board.c | 2 +-
arch/arm/boards/usb-a926x/init.c | 1 +
arch/arm/include/asm/gpio.h | 5 +-
arch/arm/mach-at91/at91rm9200_devices.c | 3 +-
arch/arm/mach-at91/at91sam9260_devices.c | 3 +-
arch/arm/mach-at91/at91sam9261_devices.c | 3 +-
arch/arm/mach-at91/at91sam9263_devices.c | 3 +-
arch/arm/mach-at91/at91sam9g45_devices.c | 3 +-
arch/arm/mach-at91/at91sam9n12_devices.c | 3 +-
arch/arm/mach-at91/at91sam9x5_devices.c | 3 +-
arch/arm/mach-at91/gpio.c | 2 +-
arch/arm/mach-at91/include/mach/gpio.h | 268 ---------------------
arch/arm/mach-at91/include/mach/io.h | 1 +
arch/arm/mach-at91/include/mach/iomux.h | 266 ++++++++++++++++++++
arch/arm/mach-at91/sama5d3_devices.c | 3 +-
arch/arm/mach-bcm2835/include/mach/gpio.h | 1 -
arch/arm/mach-clps711x/include/mach/gpio.h | 3 -
arch/arm/mach-highbank/include/mach/gpio.h | 1 -
arch/arm/mach-imx/include/mach/gpio.h | 8 -
arch/arm/mach-imx/include/mach/iomux-v1.h | 1 +
arch/arm/mach-mvebu/include/mach/gpio.h | 6 -
arch/arm/mach-mxs/include/mach/gpio.h | 11 -
arch/arm/mach-mxs/include/mach/iomux-imx23.h | 6 +-
arch/arm/mach-mxs/include/mach/iomux.h | 30 +++
arch/arm/mach-mxs/iomux-imx.c | 1 +
arch/arm/mach-omap/include/mach/gpio.h | 1 -
arch/arm/mach-omap/omap4_generic.c | 1 -
arch/arm/mach-samsung/gpio-s3c24x0.c | 1 +
arch/arm/mach-samsung/gpio-s3c64xx.c | 1 +
arch/arm/mach-samsung/gpio-s5pcxx.c | 1 +
arch/arm/mach-samsung/include/mach/gpio.h | 12 -
arch/arm/mach-samsung/include/mach/iomux.h | 28 +++
arch/arm/mach-tegra/include/mach/gpio.h | 1 -
drivers/spi/atmel_spi.c | 1 +
92 files changed, 420 insertions(+), 365 deletions(-)
create mode 100644 arch/arm/mach-at91/include/mach/iomux.h
delete mode 100644 arch/arm/mach-bcm2835/include/mach/gpio.h
delete mode 100644 arch/arm/mach-clps711x/include/mach/gpio.h
delete mode 100644 arch/arm/mach-highbank/include/mach/gpio.h
delete mode 100644 arch/arm/mach-imx/include/mach/gpio.h
delete mode 100644 arch/arm/mach-mvebu/include/mach/gpio.h
create mode 100644 arch/arm/mach-mxs/include/mach/iomux.h
delete mode 100644 arch/arm/mach-omap/include/mach/gpio.h
create mode 100644 arch/arm/mach-samsung/include/mach/iomux.h
delete mode 100644 arch/arm/mach-tegra/include/mach/gpio.h
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/8] ARM: AT91: Add missing include
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 2/8] ARM: include <gpio.h> instead of <mach/gpio.h> Sascha Hauer
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
mach/io.h uses AT91_BASE_SYS, hence it needs mach/hardware.h.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-at91/include/mach/io.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
index bffa8f2..a1d970f 100644
--- a/arch/arm/mach-at91/include/mach/io.h
+++ b/arch/arm/mach-at91/include/mach/io.h
@@ -19,6 +19,7 @@
#define __ASM_ARCH_IO_H
#include <io.h>
+#include <mach/hardware.h>
static inline unsigned int at91_sys_read(unsigned int reg_offset)
{
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/8] ARM: include <gpio.h> instead of <mach/gpio.h>
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
2013-08-17 9:25 ` [PATCH 1/8] ARM: AT91: Add missing include Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 3/8] ARM: i.MX23: Fix double include protection Sascha Hauer
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
The gpio api should be used from <gpio.h>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/at91rm9200ek/init.c | 2 +-
arch/arm/boards/at91sam9m10g45ek/init.c | 2 +-
arch/arm/boards/ccxmx51/ccxmx51.c | 1 -
arch/arm/boards/ccxmx51/ccxmx51js.c | 2 +-
arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 2 +-
arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c | 2 +-
arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 2 +-
arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c | 2 +-
arch/arm/boards/freescale-mx25-3-stack/3stack.c | 2 +-
arch/arm/boards/freescale-mx35-3-stack/3stack.c | 2 +-
arch/arm/boards/freescale-mx51-pdk/board.c | 2 +-
arch/arm/boards/freescale-mx53-smd/board.c | 2 +-
arch/arm/boards/freescale-mx6-arm2/board.c | 2 +-
arch/arm/boards/freescale-mx6-sabrelite/board.c | 3 +--
arch/arm/boards/freescale-mx6-sabresd/board.c | 3 +--
arch/arm/boards/friendlyarm-mini2440/mini2440.c | 2 +-
arch/arm/boards/guf-cupid/board.c | 2 +-
arch/arm/boards/guf-neso/board.c | 2 +-
arch/arm/boards/imx21ads/imx21ads.c | 2 +-
arch/arm/boards/imx27ads/imx27ads.c | 2 +-
arch/arm/boards/karo-tx25/board.c | 2 +-
arch/arm/boards/karo-tx51/tx51.c | 2 +-
arch/arm/boards/karo-tx53/board.c | 2 +-
arch/arm/boards/mmccpu/init.c | 2 +-
arch/arm/boards/panda/board.c | 2 +-
arch/arm/boards/pcm037/pcm037.c | 2 +-
arch/arm/boards/pcm038/pcm038.c | 2 +-
arch/arm/boards/pcm038/pcm970.c | 2 +-
arch/arm/boards/pcm043/pcm043.c | 2 +-
arch/arm/boards/pcm049/board.c | 2 +-
arch/arm/boards/phycard-a-xl2/pca-a-xl2.c | 2 +-
arch/arm/boards/phycard-i.MX27/pca100.c | 2 +-
arch/arm/boards/pm9261/init.c | 2 +-
arch/arm/boards/pm9263/init.c | 2 +-
arch/arm/boards/pm9g45/init.c | 2 +-
arch/arm/boards/scb9328/scb9328.c | 1 -
arch/arm/boards/tqma53/board.c | 2 +-
arch/arm/mach-at91/at91rm9200_devices.c | 2 +-
arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
arch/arm/mach-at91/at91sam9g45_devices.c | 2 +-
arch/arm/mach-at91/at91sam9n12_devices.c | 2 +-
arch/arm/mach-at91/at91sam9x5_devices.c | 2 +-
arch/arm/mach-at91/gpio.c | 1 -
arch/arm/mach-at91/sama5d3_devices.c | 2 +-
arch/arm/mach-omap/omap4_generic.c | 1 -
47 files changed, 43 insertions(+), 49 deletions(-)
diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c
index cd8a165..c04f295 100644
--- a/arch/arm/boards/at91rm9200ek/init.c
+++ b/arch/arm/boards/at91rm9200ek/init.c
@@ -22,13 +22,13 @@
#include <generated/mach-types.h>
#include <partition.h>
#include <fs.h>
+#include <gpio.h>
#include <fcntl.h>
#include <io.h>
#include <sizes.h>
#include <asm/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index 5aa8695..cd831cf 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -20,6 +20,7 @@
#include <net.h>
#include <mci.h>
#include <init.h>
+#include <gpio.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -33,7 +34,6 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <gpio_keys.h>
diff --git a/arch/arm/boards/ccxmx51/ccxmx51.c b/arch/arm/boards/ccxmx51/ccxmx51.c
index 2485e12..89d8f6c 100644
--- a/arch/arm/boards/ccxmx51/ccxmx51.c
+++ b/arch/arm/boards/ccxmx51/ccxmx51.c
@@ -25,7 +25,6 @@
#include <environment.h>
#include <mach/imx51-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/ccxmx51/ccxmx51js.c b/arch/arm/boards/ccxmx51/ccxmx51js.c
index 3bd50ac..189e9a5 100644
--- a/arch/arm/boards/ccxmx51/ccxmx51js.c
+++ b/arch/arm/boards/ccxmx51/ccxmx51js.c
@@ -18,9 +18,9 @@
#include <common.h>
#include <io.h>
#include <init.h>
+#include <gpio.h>
#include <mci.h>
#include <asm/armlinux.h>
-#include <mach/gpio.h>
#include <mach/generic.h>
#include <mach/imx51-regs.h>
#include <mach/iomux-mx51.h>
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index a6f27dc..0de30e8 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -21,12 +21,12 @@
#include <common.h>
#include <init.h>
#include <driver.h>
+#include <gpio.h>
#include <environment.h>
#include <mach/imx25-regs.h>
#include <asm/armlinux.h>
#include <asm/barebox-arm.h>
#include <asm/sections.h>
-#include <mach/gpio.h>
#include <io.h>
#include <asm/mmu.h>
#include <led.h>
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
index 75f3239..81ac654 100644
--- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -24,7 +24,7 @@
#include <mach/imx27-regs.h>
#include <fec.h>
#include <notifier.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index e406fe8..8db2ab1 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -33,13 +33,13 @@
#include <nand.h>
#include <net.h>
#include <partition.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <io.h>
#include <generated/mach-types.h>
#include <asm/mmu.h>
-#include <mach/gpio.h>
#include <mach/imx-nand.h>
#include <mach/imx35-regs.h>
#include <mach/iomux-mx35.h>
diff --git a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
index 523a805..ceabac6 100644
--- a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
+++ b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
@@ -21,7 +21,7 @@
#include <environment.h>
#include <mach/imx51-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/freescale-mx25-3-stack/3stack.c b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
index 6620a86..cba5cce 100644
--- a/arch/arm/boards/freescale-mx25-3-stack/3stack.c
+++ b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
@@ -20,12 +20,12 @@
#include <common.h>
#include <init.h>
#include <driver.h>
+#include <gpio.h>
#include <environment.h>
#include <mach/imx25-regs.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <asm/barebox-arm.h>
-#include <mach/gpio.h>
#include <io.h>
#include <partition.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/freescale-mx35-3-stack/3stack.c b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
index f30d77d..c8358da 100644
--- a/arch/arm/boards/freescale-mx35-3-stack/3stack.c
+++ b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
@@ -32,6 +32,7 @@
#include <net.h>
#include <sizes.h>
#include <partition.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
@@ -39,7 +40,6 @@
#include <io.h>
#include <generated/mach-types.h>
-#include <mach/gpio.h>
#include <mach/weim.h>
#include <mach/imx-nand.h>
#include <mach/imx35-regs.h>
diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
index cafcf37..ad09781 100644
--- a/arch/arm/boards/freescale-mx51-pdk/board.c
+++ b/arch/arm/boards/freescale-mx51-pdk/board.c
@@ -19,7 +19,7 @@
#include <environment.h>
#include <mach/imx51-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/freescale-mx53-smd/board.c b/arch/arm/boards/freescale-mx53-smd/board.c
index d7f6e8b..8c29e90 100644
--- a/arch/arm/boards/freescale-mx53-smd/board.c
+++ b/arch/arm/boards/freescale-mx53-smd/board.c
@@ -24,6 +24,7 @@
#include <net.h>
#include <partition.h>
#include <sizes.h>
+#include <gpio.h>
#include <generated/mach-types.h>
@@ -31,7 +32,6 @@
#include <mach/iomux-mx53.h>
#include <mach/devices-imx53.h>
#include <mach/generic.h>
-#include <mach/gpio.h>
#include <mach/imx-nand.h>
#include <mach/iim.h>
#include <mach/imx5.h>
diff --git a/arch/arm/boards/freescale-mx6-arm2/board.c b/arch/arm/boards/freescale-mx6-arm2/board.c
index 538ab7f..7dbcecc 100644
--- a/arch/arm/boards/freescale-mx6-arm2/board.c
+++ b/arch/arm/boards/freescale-mx6-arm2/board.c
@@ -17,7 +17,7 @@
#include <environment.h>
#include <mach/imx6-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/board.c b/arch/arm/boards/freescale-mx6-sabrelite/board.c
index 39f465b..8bbeecd 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/board.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/board.c
@@ -19,7 +19,7 @@
#include <environment.h>
#include <mach/imx6-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
@@ -33,7 +33,6 @@
#include <mach/imx6.h>
#include <mach/devices-imx6.h>
#include <mach/iomux-mx6.h>
-#include <mach/gpio.h>
#include <spi/spi.h>
#include <mach/spi.h>
#include <mach/usb.h>
diff --git a/arch/arm/boards/freescale-mx6-sabresd/board.c b/arch/arm/boards/freescale-mx6-sabresd/board.c
index 422c0d9..0b6bf69 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/board.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/board.c
@@ -20,7 +20,7 @@
#include <environment.h>
#include <mach/imx6-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
@@ -33,7 +33,6 @@
#include <mach/imx6.h>
#include <mach/devices-imx6.h>
#include <mach/iomux-mx6.h>
-#include <mach/gpio.h>
#include <spi/spi.h>
#include <mach/spi.h>
#include <mach/usb.h>
diff --git a/arch/arm/boards/friendlyarm-mini2440/mini2440.c b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
index de07bda..aec3e67 100644
--- a/arch/arm/boards/friendlyarm-mini2440/mini2440.c
+++ b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
@@ -34,7 +34,7 @@
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <io.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <mach/s3c-iomap.h>
#include <mach/devices-s3c24xx.h>
#include <mach/s3c24xx-nand.h>
diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index 67a4b1d..32a3ed4 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -27,8 +27,8 @@
#include <fs.h>
#include <mach/imx35-regs.h>
#include <asm/armlinux.h>
-#include <mach/gpio.h>
#include <io.h>
+#include <gpio.h>
#include <partition.h>
#include <nand.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index 00e0d21..055da54 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -21,6 +21,7 @@
#include <fec.h>
#include <notifier.h>
#include <partition.h>
+#include <gpio.h>
#include <fs.h>
#include <fcntl.h>
#include <nand.h>
@@ -33,7 +34,6 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/gpio.h>
#include <mach/spi.h>
#include <mach/imx27-regs.h>
#include <mach/iomux-mx27.h>
diff --git a/arch/arm/boards/imx21ads/imx21ads.c b/arch/arm/boards/imx21ads/imx21ads.c
index 8717774..3d110f9 100644
--- a/arch/arm/boards/imx21ads/imx21ads.c
+++ b/arch/arm/boards/imx21ads/imx21ads.c
@@ -26,7 +26,7 @@
#include <asm/sections.h>
#include <asm/barebox-arm.h>
#include <io.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <mach/weim.h>
#include <partition.h>
#include <fs.h>
diff --git a/arch/arm/boards/imx27ads/imx27ads.c b/arch/arm/boards/imx27ads/imx27ads.c
index fc8cf4a..71749dc 100644
--- a/arch/arm/boards/imx27ads/imx27ads.c
+++ b/arch/arm/boards/imx27ads/imx27ads.c
@@ -22,7 +22,7 @@
#include <asm/armlinux.h>
#include <io.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <mach/weim.h>
#include <partition.h>
#include <fs.h>
diff --git a/arch/arm/boards/karo-tx25/board.c b/arch/arm/boards/karo-tx25/board.c
index bffa11e..d9669f1 100644
--- a/arch/arm/boards/karo-tx25/board.c
+++ b/arch/arm/boards/karo-tx25/board.c
@@ -21,12 +21,12 @@
#include <init.h>
#include <driver.h>
#include <sizes.h>
+#include <gpio.h>
#include <environment.h>
#include <mach/imx25-regs.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <asm/barebox-arm.h>
-#include <mach/gpio.h>
#include <io.h>
#include <partition.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/karo-tx51/tx51.c b/arch/arm/boards/karo-tx51/tx51.c
index d1407a8..55643f2 100644
--- a/arch/arm/boards/karo-tx51/tx51.c
+++ b/arch/arm/boards/karo-tx51/tx51.c
@@ -20,7 +20,7 @@
#include <environment.h>
#include <mach/imx51-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/karo-tx53/board.c b/arch/arm/boards/karo-tx53/board.c
index 6ead6a9..ad867cb 100644
--- a/arch/arm/boards/karo-tx53/board.c
+++ b/arch/arm/boards/karo-tx53/board.c
@@ -23,6 +23,7 @@
#include <net.h>
#include <partition.h>
#include <sizes.h>
+#include <gpio.h>
#include <generated/mach-types.h>
@@ -30,7 +31,6 @@
#include <mach/iomux-mx53.h>
#include <mach/devices-imx53.h>
#include <mach/generic.h>
-#include <mach/gpio.h>
#include <mach/imx-nand.h>
#include <mach/iim.h>
#include <mach/imx5.h>
diff --git a/arch/arm/boards/mmccpu/init.c b/arch/arm/boards/mmccpu/init.c
index 1569487..11c4bf5 100644
--- a/arch/arm/boards/mmccpu/init.c
+++ b/arch/arm/boards/mmccpu/init.c
@@ -19,6 +19,7 @@
#include <init.h>
#include <environment.h>
#include <fec.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
@@ -30,7 +31,6 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
static struct macb_platform_data macb_pdata = {
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index d1f9a5e..951fc5a 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -3,6 +3,7 @@
#include <init.h>
#include <driver.h>
#include <io.h>
+#include <gpio.h>
#include <ns16550.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -16,7 +17,6 @@
#include <linux/err.h>
#include <sizes.h>
#include <asm/mmu.h>
-#include <mach/gpio.h>
#include <envfs.h>
#include <i2c/i2c.h>
#include <gpio.h>
diff --git a/arch/arm/boards/pcm037/pcm037.c b/arch/arm/boards/pcm037/pcm037.c
index de83c99..ed3525c 100644
--- a/arch/arm/boards/pcm037/pcm037.c
+++ b/arch/arm/boards/pcm037/pcm037.c
@@ -22,13 +22,13 @@
#include <init.h>
#include <driver.h>
#include <fs.h>
+#include <gpio.h>
#include <environment.h>
#include <usb/ulpi.h>
#include <mach/imx31-regs.h>
#include <mach/iomux-mx31.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
-#include <mach/gpio.h>
#include <mach/weim.h>
#include <io.h>
#include <smc911x.h>
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index b573289..1800dd0 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -24,7 +24,7 @@
#include <fec.h>
#include <sizes.h>
#include <notifier.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
diff --git a/arch/arm/boards/pcm038/pcm970.c b/arch/arm/boards/pcm038/pcm970.c
index b176d8d..2b2483b 100644
--- a/arch/arm/boards/pcm038/pcm970.c
+++ b/arch/arm/boards/pcm038/pcm970.c
@@ -15,11 +15,11 @@
#include <io.h>
#include <init.h>
#include <sizes.h>
+#include <gpio.h>
#include <platform_ide.h>
#include <mach/imx27-regs.h>
#include <mach/iomux-mx27.h>
#include <mach/weim.h>
-#include <mach/gpio.h>
#include <mach/devices-imx27.h>
#include <usb/chipidea-imx.h>
diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c
index 68b7864..e6987da 100644
--- a/arch/arm/boards/pcm043/pcm043.c
+++ b/arch/arm/boards/pcm043/pcm043.c
@@ -25,10 +25,10 @@
#include <driver.h>
#include <environment.h>
#include <fs.h>
+#include <gpio.h>
#include <sizes.h>
#include <mach/imx35-regs.h>
#include <asm/armlinux.h>
-#include <mach/gpio.h>
#include <io.h>
#include <partition.h>
#include <nand.h>
diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c
index 6e4dbf6..e7d947f 100644
--- a/arch/arm/boards/pcm049/board.c
+++ b/arch/arm/boards/pcm049/board.c
@@ -18,6 +18,7 @@
#include <console.h>
#include <init.h>
#include <driver.h>
+#include <gpio.h>
#include <io.h>
#include <ns16550.h>
#include <asm/armlinux.h>
@@ -35,7 +36,6 @@
#include <partition.h>
#include <nand.h>
#include <asm/mmu.h>
-#include <mach/gpio.h>
#include <mach/gpmc.h>
#include <mach/gpmc_nand.h>
#include <i2c/i2c.h>
diff --git a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
index 8f79d98..7bb6140 100644
--- a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
+++ b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
@@ -19,6 +19,7 @@
#include <init.h>
#include <driver.h>
#include <io.h>
+#include <gpio.h>
#include <ns16550.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -32,7 +33,6 @@
#include <partition.h>
#include <nand.h>
#include <asm/mmu.h>
-#include <mach/gpio.h>
#include <mach/gpmc.h>
#include <mach/gpmc_nand.h>
#include <mach/omap_hsmmc.h>
diff --git a/arch/arm/boards/phycard-i.MX27/pca100.c b/arch/arm/boards/phycard-i.MX27/pca100.c
index 4740756..1a64fc0 100644
--- a/arch/arm/boards/phycard-i.MX27/pca100.c
+++ b/arch/arm/boards/phycard-i.MX27/pca100.c
@@ -20,7 +20,7 @@
#include <environment.h>
#include <mach/imx27-regs.h>
#include <fec.h>
-#include <mach/gpio.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index 51dc351..e42f6e4 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <net.h>
#include <init.h>
+#include <gpio.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -31,7 +32,6 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <dm9000.h>
diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index 559e321..24476f1 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -25,6 +25,7 @@
#include <generated/mach-types.h>
#include <partition.h>
#include <fs.h>
+#include <gpio.h>
#include <fcntl.h>
#include <io.h>
#include <asm/hardware.h>
@@ -32,7 +33,6 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <linux/w1-gpio.h>
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 9bb1f1f..982b427 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -25,13 +25,13 @@
#include <partition.h>
#include <fs.h>
#include <fcntl.h>
+#include <gpio.h>
#include <io.h>
#include <asm/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <linux/w1-gpio.h>
diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index d91b21d..541dddf 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -21,7 +21,6 @@
#include <generated/mach-types.h>
#include <mach/imx1-regs.h>
#include <asm/armlinux.h>
-#include <mach/gpio.h>
#include <mach/weim.h>
#include <io.h>
#include <partition.h>
diff --git a/arch/arm/boards/tqma53/board.c b/arch/arm/boards/tqma53/board.c
index 19ad37e..5173ca4 100644
--- a/arch/arm/boards/tqma53/board.c
+++ b/arch/arm/boards/tqma53/board.c
@@ -23,6 +23,7 @@
#include <net.h>
#include <partition.h>
#include <sizes.h>
+#include <gpio.h>
#include <mci.h>
#include <io.h>
@@ -34,7 +35,6 @@
#include <mach/iomux-mx53.h>
#include <mach/devices-imx53.h>
#include <mach/generic.h>
-#include <mach/gpio.h>
#include <mach/imx-nand.h>
#include <mach/iim.h>
#include <mach/imx5.h>
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index ee07848..2eba82b 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -11,11 +11,11 @@
*
*/
#include <common.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <mach/hardware.h>
#include <mach/at91rm9200.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/at91rm9200_mc.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index cff0d90..e5cb8c0 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -11,13 +11,13 @@
*/
#include <common.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/board.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9260_matrix.h>
#include <mach/at91sam9_sdramc.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index e3e51bf..089c56a 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -11,13 +11,13 @@
*/
#include <common.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9261_matrix.h>
#include <mach/at91sam9_sdramc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index a93220d..6cd1b89 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -11,13 +11,13 @@
*/
#include <common.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9263_matrix.h>
#include <mach/at91sam9_sdramc.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 68ed841..c51f0b3 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -11,13 +11,13 @@
*/
#include <common.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9g45_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
#include <mach/board.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9n12_devices.c b/arch/arm/mach-at91/at91sam9n12_devices.c
index aeac2aa..3a6a9a7 100644
--- a/arch/arm/mach-at91/at91sam9n12_devices.c
+++ b/arch/arm/mach-at91/at91sam9n12_devices.c
@@ -12,13 +12,13 @@
#include <common.h>
#include <init.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/board.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9n12_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9x5_devices.c b/arch/arm/mach-at91/at91sam9x5_devices.c
index d12ee57..9a2f584 100644
--- a/arch/arm/mach-at91/at91sam9x5_devices.c
+++ b/arch/arm/mach-at91/at91sam9x5_devices.c
@@ -11,13 +11,13 @@
*/
#include <common.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/board.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9x5_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index 0e39a52..b6cedff 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -24,7 +24,6 @@
#include <linux/err.h>
#include <errno.h>
#include <io.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <gpio.h>
diff --git a/arch/arm/mach-at91/sama5d3_devices.c b/arch/arm/mach-at91/sama5d3_devices.c
index 031168b..28b1ba1 100644
--- a/arch/arm/mach-at91/sama5d3_devices.c
+++ b/arch/arm/mach-at91/sama5d3_devices.c
@@ -12,13 +12,13 @@
#include <common.h>
#include <init.h>
#include <sizes.h>
+#include <gpio.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
#include <mach/board.h>
#include <mach/at91_pmc.h>
#include <mach/at91sam9x5_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
-#include <mach/gpio.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c
index 54cefa2..64b0024 100644
--- a/arch/arm/mach-omap/omap4_generic.c
+++ b/arch/arm/mach-omap/omap4_generic.c
@@ -8,7 +8,6 @@
#include <mach/syslib.h>
#include <mach/generic.h>
#include <mach/gpmc.h>
-#include <mach/gpio.h>
#include <mach/omap4_rom_usb.h>
/*
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/8] ARM: i.MX23: Fix double include protection
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
2013-08-17 9:25 ` [PATCH 1/8] ARM: AT91: Add missing include Sascha Hauer
2013-08-17 9:25 ` [PATCH 2/8] ARM: include <gpio.h> instead of <mach/gpio.h> Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 4/8] ARM: AT91: move iomux definitions to iomux.h Sascha Hauer
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
Using __ASM_MACH_IOMUX_H will break once we introduce a
iomux.h which uses exactly this string as double include
protection. Use a SoC specific string instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-mxs/include/mach/iomux-imx23.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-mxs/include/mach/iomux-imx23.h b/arch/arm/mach-mxs/include/mach/iomux-imx23.h
index ebe0ac4..39d6981 100644
--- a/arch/arm/mach-mxs/include/mach/iomux-imx23.h
+++ b/arch/arm/mach-mxs/include/mach/iomux-imx23.h
@@ -27,8 +27,8 @@
* ^_____________________ initial output value if enabled as GPIO and configured as output
* ^______________________ Bit keeper present
*/
-#ifndef __ASM_MACH_IOMUX_H
-#define __ASM_MACH_IOMUX_H
+#ifndef __ASM_MACH_IOMUX_MX23_H
+#define __ASM_MACH_IOMUX_MX23_H
/* control pad's function */
#define FBIT_SHIFT (3)
@@ -422,4 +422,4 @@
#define EMI_DQM0 (FUNC(0) | PORTF(7, 0) | SE | VE | PE)
#define EMI_DQM0_DISABLED (FUNC(3) | PORTF(7, 0) | SE | VE | PE)
-#endif /* __ASM_MACH_IOMUX_H */
+#endif /* __ASM_MACH_IOMUX_MX23_H */
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/8] ARM: AT91: move iomux definitions to iomux.h
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
` (2 preceding siblings ...)
2013-08-17 9:25 ` [PATCH 3/8] ARM: i.MX23: Fix double include protection Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 5/8] ARM: MXS: " Sascha Hauer
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
mach/gpio.h is for the gpio API, so move unrelated stuff
away.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/animeo_ip/init.c | 1 +
arch/arm/boards/at91rm9200ek/init.c | 1 +
arch/arm/boards/at91sam9260ek/init.c | 1 +
arch/arm/boards/at91sam9261ek/init.c | 1 +
arch/arm/boards/at91sam9263ek/init.c | 1 +
arch/arm/boards/at91sam9m10g45ek/init.c | 1 +
arch/arm/boards/at91sam9m10ihd/init.c | 1 +
arch/arm/boards/at91sam9n12ek/init.c | 1 +
arch/arm/boards/at91sam9x5ek/init.c | 1 +
arch/arm/boards/dss11/init.c | 1 +
arch/arm/boards/mmccpu/init.c | 1 +
arch/arm/boards/pm9261/init.c | 1 +
arch/arm/boards/pm9263/init.c | 1 +
arch/arm/boards/pm9g45/init.c | 1 +
arch/arm/boards/qil-a926x/init.c | 1 +
arch/arm/boards/sama5d3xek/init.c | 1 +
arch/arm/boards/telit-evk-pro3/init.c | 1 +
arch/arm/boards/tny-a926x/init.c | 1 +
arch/arm/boards/usb-a926x/init.c | 1 +
arch/arm/mach-at91/at91rm9200_devices.c | 1 +
arch/arm/mach-at91/at91sam9260_devices.c | 1 +
arch/arm/mach-at91/at91sam9261_devices.c | 1 +
arch/arm/mach-at91/at91sam9263_devices.c | 1 +
arch/arm/mach-at91/at91sam9g45_devices.c | 1 +
arch/arm/mach-at91/at91sam9n12_devices.c | 1 +
arch/arm/mach-at91/at91sam9x5_devices.c | 1 +
arch/arm/mach-at91/gpio.c | 1 +
arch/arm/mach-at91/include/mach/gpio.h | 268 -------------------------------
arch/arm/mach-at91/include/mach/iomux.h | 266 ++++++++++++++++++++++++++++++
arch/arm/mach-at91/sama5d3_devices.c | 1 +
drivers/spi/atmel_spi.c | 1 +
31 files changed, 295 insertions(+), 268 deletions(-)
create mode 100644 arch/arm/mach-at91/include/mach/iomux.h
diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index d8f9796..c240767 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -22,6 +22,7 @@
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
#include <gpio.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c
index c04f295..16f33e0 100644
--- a/arch/arm/boards/at91rm9200ek/init.c
+++ b/arch/arm/boards/at91rm9200ek/init.c
@@ -29,6 +29,7 @@
#include <asm/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index d2ace1d..d7a28cc 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -23,6 +23,7 @@
#include <mach/at91sam9_smc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_rstc.h>
#include <linux/clk.h>
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 91640f9..01a0215 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -32,6 +32,7 @@
#include <mach/board.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91sam9_smc.h>
#include <dm9000.h>
#include <gpio_keys.h>
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index ebc1697..c4269a3 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -32,6 +32,7 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <gpio.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index cd831cf..539cbee 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -34,6 +34,7 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <gpio_keys.h>
diff --git a/arch/arm/boards/at91sam9m10ihd/init.c b/arch/arm/boards/at91sam9m10ihd/init.c
index 9135b0c..7fa6afb 100644
--- a/arch/arm/boards/at91sam9m10ihd/init.c
+++ b/arch/arm/boards/at91sam9m10ihd/init.c
@@ -22,6 +22,7 @@
#include <mach/board.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91sam9_smc.h>
#include <input/qt1070.h>
#include <readkey.h>
diff --git a/arch/arm/boards/at91sam9n12ek/init.c b/arch/arm/boards/at91sam9n12ek/init.c
index 0267a7d..440d39d 100644
--- a/arch/arm/boards/at91sam9n12ek/init.c
+++ b/arch/arm/boards/at91sam9n12ek/init.c
@@ -33,6 +33,7 @@
#include <mach/at91sam9_smc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <mach/at91sam9x5_matrix.h>
diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c
index 3d4d95b..c794876 100644
--- a/arch/arm/boards/at91sam9x5ek/init.c
+++ b/arch/arm/boards/at91sam9x5ek/init.c
@@ -33,6 +33,7 @@
#include <mach/at91sam9_smc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <mach/at91sam9x5_matrix.h>
diff --git a/arch/arm/boards/dss11/init.c b/arch/arm/boards/dss11/init.c
index e53ae88..f769f4f 100644
--- a/arch/arm/boards/dss11/init.c
+++ b/arch/arm/boards/dss11/init.c
@@ -31,6 +31,7 @@
#include <mach/at91sam9_smc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_rstc.h>
#include <linux/clk.h>
diff --git a/arch/arm/boards/mmccpu/init.c b/arch/arm/boards/mmccpu/init.c
index 11c4bf5..b695741 100644
--- a/arch/arm/boards/mmccpu/init.c
+++ b/arch/arm/boards/mmccpu/init.c
@@ -31,6 +31,7 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
static struct macb_platform_data macb_pdata = {
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index e42f6e4..d23e834 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -32,6 +32,7 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <dm9000.h>
diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index 24476f1..76fef7d 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -34,6 +34,7 @@
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91sam9_smc.h>
#include <linux/w1-gpio.h>
#include <w1_mac_address.h>
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 982b427..1a902ac 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -32,6 +32,7 @@
#include <linux/mtd/nand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/at91sam9_smc.h>
#include <linux/w1-gpio.h>
diff --git a/arch/arm/boards/qil-a926x/init.c b/arch/arm/boards/qil-a926x/init.c
index 58ab386..30aa64a 100644
--- a/arch/arm/boards/qil-a926x/init.c
+++ b/arch/arm/boards/qil-a926x/init.c
@@ -25,6 +25,7 @@
#include <gpio.h>
#include <led.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index 6aae167..fa57f18 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -33,6 +33,7 @@
#include <mach/at91sam9_smc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <mach/at91sam9x5_matrix.h>
diff --git a/arch/arm/boards/telit-evk-pro3/init.c b/arch/arm/boards/telit-evk-pro3/init.c
index b933f9f..38e3900 100644
--- a/arch/arm/boards/telit-evk-pro3/init.c
+++ b/arch/arm/boards/telit-evk-pro3/init.c
@@ -22,6 +22,7 @@
#include <mach/at91sam9_smc.h>
#include <mach/board.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <nand.h>
#define BOOTSTRAP_SIZE 0xC0000
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index cdfe046..6ad049d 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -34,6 +34,7 @@
#include <mach/at91sam9_sdramc.h>
#include <gpio.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <spi/eeprom.h>
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 74d4867..edeee4e 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -35,6 +35,7 @@
#include <gpio.h>
#include <led.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <gpio_keys.h>
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 2eba82b..ce0e416 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -16,6 +16,7 @@
#include <mach/hardware.h>
#include <mach/at91rm9200.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/at91rm9200_mc.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index e5cb8c0..84a0329 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -18,6 +18,7 @@
#include <mach/at91_pmc.h>
#include <mach/at91sam9260_matrix.h>
#include <mach/at91sam9_sdramc.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 089c56a..b522afb 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -18,6 +18,7 @@
#include <mach/at91sam9261_matrix.h>
#include <mach/at91sam9_sdramc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 6cd1b89..9d8bc32 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -18,6 +18,7 @@
#include <mach/at91sam9263_matrix.h>
#include <mach/at91sam9_sdramc.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index c51f0b3..3e0bc10 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -18,6 +18,7 @@
#include <mach/at91sam9g45_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
#include <mach/board.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9n12_devices.c b/arch/arm/mach-at91/at91sam9n12_devices.c
index 3a6a9a7..3616801 100644
--- a/arch/arm/mach-at91/at91sam9n12_devices.c
+++ b/arch/arm/mach-at91/at91sam9n12_devices.c
@@ -20,6 +20,7 @@
#include <mach/at91sam9n12_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/at91sam9x5_devices.c b/arch/arm/mach-at91/at91sam9x5_devices.c
index 9a2f584..f80c1af 100644
--- a/arch/arm/mach-at91/at91sam9x5_devices.c
+++ b/arch/arm/mach-at91/at91sam9x5_devices.c
@@ -19,6 +19,7 @@
#include <mach/at91sam9x5_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index b6cedff..b111373 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -24,6 +24,7 @@
#include <linux/err.h>
#include <errno.h>
#include <io.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <gpio.h>
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
index eb64bd4..306ab4c 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -1,269 +1 @@
-/*
- * [origin: Linux kernel include/asm-arm/arch-at91/gpio.h]
- *
- * Copyright (C) 2005 HP Labs
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_AT91_GPIO_H
-#define __ASM_ARCH_AT91_GPIO_H
-
-#include <io.h>
-#include <asm-generic/errno.h>
-#include <mach/at91_pio.h>
-#include <mach/hardware.h>
#include <asm-generic/gpio.h>
-
-#define ARCH_NR_GPIOS 256
-
-#define AT91_PIN_PA0 (0x00 + 0)
-#define AT91_PIN_PA1 (0x00 + 1)
-#define AT91_PIN_PA2 (0x00 + 2)
-#define AT91_PIN_PA3 (0x00 + 3)
-#define AT91_PIN_PA4 (0x00 + 4)
-#define AT91_PIN_PA5 (0x00 + 5)
-#define AT91_PIN_PA6 (0x00 + 6)
-#define AT91_PIN_PA7 (0x00 + 7)
-#define AT91_PIN_PA8 (0x00 + 8)
-#define AT91_PIN_PA9 (0x00 + 9)
-#define AT91_PIN_PA10 (0x00 + 10)
-#define AT91_PIN_PA11 (0x00 + 11)
-#define AT91_PIN_PA12 (0x00 + 12)
-#define AT91_PIN_PA13 (0x00 + 13)
-#define AT91_PIN_PA14 (0x00 + 14)
-#define AT91_PIN_PA15 (0x00 + 15)
-#define AT91_PIN_PA16 (0x00 + 16)
-#define AT91_PIN_PA17 (0x00 + 17)
-#define AT91_PIN_PA18 (0x00 + 18)
-#define AT91_PIN_PA19 (0x00 + 19)
-#define AT91_PIN_PA20 (0x00 + 20)
-#define AT91_PIN_PA21 (0x00 + 21)
-#define AT91_PIN_PA22 (0x00 + 22)
-#define AT91_PIN_PA23 (0x00 + 23)
-#define AT91_PIN_PA24 (0x00 + 24)
-#define AT91_PIN_PA25 (0x00 + 25)
-#define AT91_PIN_PA26 (0x00 + 26)
-#define AT91_PIN_PA27 (0x00 + 27)
-#define AT91_PIN_PA28 (0x00 + 28)
-#define AT91_PIN_PA29 (0x00 + 29)
-#define AT91_PIN_PA30 (0x00 + 30)
-#define AT91_PIN_PA31 (0x00 + 31)
-
-#define AT91_PIN_PB0 (0x20 + 0)
-#define AT91_PIN_PB1 (0x20 + 1)
-#define AT91_PIN_PB2 (0x20 + 2)
-#define AT91_PIN_PB3 (0x20 + 3)
-#define AT91_PIN_PB4 (0x20 + 4)
-#define AT91_PIN_PB5 (0x20 + 5)
-#define AT91_PIN_PB6 (0x20 + 6)
-#define AT91_PIN_PB7 (0x20 + 7)
-#define AT91_PIN_PB8 (0x20 + 8)
-#define AT91_PIN_PB9 (0x20 + 9)
-#define AT91_PIN_PB10 (0x20 + 10)
-#define AT91_PIN_PB11 (0x20 + 11)
-#define AT91_PIN_PB12 (0x20 + 12)
-#define AT91_PIN_PB13 (0x20 + 13)
-#define AT91_PIN_PB14 (0x20 + 14)
-#define AT91_PIN_PB15 (0x20 + 15)
-#define AT91_PIN_PB16 (0x20 + 16)
-#define AT91_PIN_PB17 (0x20 + 17)
-#define AT91_PIN_PB18 (0x20 + 18)
-#define AT91_PIN_PB19 (0x20 + 19)
-#define AT91_PIN_PB20 (0x20 + 20)
-#define AT91_PIN_PB21 (0x20 + 21)
-#define AT91_PIN_PB22 (0x20 + 22)
-#define AT91_PIN_PB23 (0x20 + 23)
-#define AT91_PIN_PB24 (0x20 + 24)
-#define AT91_PIN_PB25 (0x20 + 25)
-#define AT91_PIN_PB26 (0x20 + 26)
-#define AT91_PIN_PB27 (0x20 + 27)
-#define AT91_PIN_PB28 (0x20 + 28)
-#define AT91_PIN_PB29 (0x20 + 29)
-#define AT91_PIN_PB30 (0x20 + 30)
-#define AT91_PIN_PB31 (0x20 + 31)
-
-#define AT91_PIN_PC0 (0x40 + 0)
-#define AT91_PIN_PC1 (0x40 + 1)
-#define AT91_PIN_PC2 (0x40 + 2)
-#define AT91_PIN_PC3 (0x40 + 3)
-#define AT91_PIN_PC4 (0x40 + 4)
-#define AT91_PIN_PC5 (0x40 + 5)
-#define AT91_PIN_PC6 (0x40 + 6)
-#define AT91_PIN_PC7 (0x40 + 7)
-#define AT91_PIN_PC8 (0x40 + 8)
-#define AT91_PIN_PC9 (0x40 + 9)
-#define AT91_PIN_PC10 (0x40 + 10)
-#define AT91_PIN_PC11 (0x40 + 11)
-#define AT91_PIN_PC12 (0x40 + 12)
-#define AT91_PIN_PC13 (0x40 + 13)
-#define AT91_PIN_PC14 (0x40 + 14)
-#define AT91_PIN_PC15 (0x40 + 15)
-#define AT91_PIN_PC16 (0x40 + 16)
-#define AT91_PIN_PC17 (0x40 + 17)
-#define AT91_PIN_PC18 (0x40 + 18)
-#define AT91_PIN_PC19 (0x40 + 19)
-#define AT91_PIN_PC20 (0x40 + 20)
-#define AT91_PIN_PC21 (0x40 + 21)
-#define AT91_PIN_PC22 (0x40 + 22)
-#define AT91_PIN_PC23 (0x40 + 23)
-#define AT91_PIN_PC24 (0x40 + 24)
-#define AT91_PIN_PC25 (0x40 + 25)
-#define AT91_PIN_PC26 (0x40 + 26)
-#define AT91_PIN_PC27 (0x40 + 27)
-#define AT91_PIN_PC28 (0x40 + 28)
-#define AT91_PIN_PC29 (0x40 + 29)
-#define AT91_PIN_PC30 (0x40 + 30)
-#define AT91_PIN_PC31 (0x40 + 31)
-
-#define AT91_PIN_PD0 (0x60 + 0)
-#define AT91_PIN_PD1 (0x60 + 1)
-#define AT91_PIN_PD2 (0x60 + 2)
-#define AT91_PIN_PD3 (0x60 + 3)
-#define AT91_PIN_PD4 (0x60 + 4)
-#define AT91_PIN_PD5 (0x60 + 5)
-#define AT91_PIN_PD6 (0x60 + 6)
-#define AT91_PIN_PD7 (0x60 + 7)
-#define AT91_PIN_PD8 (0x60 + 8)
-#define AT91_PIN_PD9 (0x60 + 9)
-#define AT91_PIN_PD10 (0x60 + 10)
-#define AT91_PIN_PD11 (0x60 + 11)
-#define AT91_PIN_PD12 (0x60 + 12)
-#define AT91_PIN_PD13 (0x60 + 13)
-#define AT91_PIN_PD14 (0x60 + 14)
-#define AT91_PIN_PD15 (0x60 + 15)
-#define AT91_PIN_PD16 (0x60 + 16)
-#define AT91_PIN_PD17 (0x60 + 17)
-#define AT91_PIN_PD18 (0x60 + 18)
-#define AT91_PIN_PD19 (0x60 + 19)
-#define AT91_PIN_PD20 (0x60 + 20)
-#define AT91_PIN_PD21 (0x60 + 21)
-#define AT91_PIN_PD22 (0x60 + 22)
-#define AT91_PIN_PD23 (0x60 + 23)
-#define AT91_PIN_PD24 (0x60 + 24)
-#define AT91_PIN_PD25 (0x60 + 25)
-#define AT91_PIN_PD26 (0x60 + 26)
-#define AT91_PIN_PD27 (0x60 + 27)
-#define AT91_PIN_PD28 (0x60 + 28)
-#define AT91_PIN_PD29 (0x60 + 29)
-#define AT91_PIN_PD30 (0x60 + 30)
-#define AT91_PIN_PD31 (0x60 + 31)
-
-#define AT91_PIN_PE0 (0x80 + 0)
-#define AT91_PIN_PE1 (0x80 + 1)
-#define AT91_PIN_PE2 (0x80 + 2)
-#define AT91_PIN_PE3 (0x80 + 3)
-#define AT91_PIN_PE4 (0x80 + 4)
-#define AT91_PIN_PE5 (0x80 + 5)
-#define AT91_PIN_PE6 (0x80 + 6)
-#define AT91_PIN_PE7 (0x80 + 7)
-#define AT91_PIN_PE8 (0x80 + 8)
-#define AT91_PIN_PE9 (0x80 + 9)
-#define AT91_PIN_PE10 (0x80 + 10)
-#define AT91_PIN_PE11 (0x80 + 11)
-#define AT91_PIN_PE12 (0x80 + 12)
-#define AT91_PIN_PE13 (0x80 + 13)
-#define AT91_PIN_PE14 (0x80 + 14)
-#define AT91_PIN_PE15 (0x80 + 15)
-#define AT91_PIN_PE16 (0x80 + 16)
-#define AT91_PIN_PE17 (0x80 + 17)
-#define AT91_PIN_PE18 (0x80 + 18)
-#define AT91_PIN_PE19 (0x80 + 19)
-#define AT91_PIN_PE20 (0x80 + 20)
-#define AT91_PIN_PE21 (0x80 + 21)
-#define AT91_PIN_PE22 (0x80 + 22)
-#define AT91_PIN_PE23 (0x80 + 23)
-#define AT91_PIN_PE24 (0x80 + 24)
-#define AT91_PIN_PE25 (0x80 + 25)
-#define AT91_PIN_PE26 (0x80 + 26)
-#define AT91_PIN_PE27 (0x80 + 27)
-#define AT91_PIN_PE28 (0x80 + 28)
-#define AT91_PIN_PE29 (0x80 + 29)
-#define AT91_PIN_PE30 (0x80 + 30)
-#define AT91_PIN_PE31 (0x80 + 31)
-
-enum at91_mux {
- AT91_MUX_GPIO = 0,
- AT91_MUX_PERIPH_A = 1,
- AT91_MUX_PERIPH_B = 2,
- AT91_MUX_PERIPH_C = 3,
- AT91_MUX_PERIPH_D = 4,
-};
-
-/*
- * mux the pin
- */
-int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup);
-
-/*
- * mux the pin to the "GPIO" peripheral role.
- */
-static inline int at91_set_GPIO_periph(unsigned pin, int use_pullup)
-{
- return at91_mux_pin(pin, AT91_MUX_GPIO, use_pullup);
-}
-
-/*
- * mux the pin to the "A" internal peripheral role.
- */
-static inline int at91_set_A_periph(unsigned pin, int use_pullup)
-{
- return at91_mux_pin(pin, AT91_MUX_PERIPH_A, use_pullup);
-}
-
-/*
- * mux the pin to the "B" internal peripheral role.
- */
-static inline int at91_set_B_periph(unsigned pin, int use_pullup)
-{
- return at91_mux_pin(pin, AT91_MUX_PERIPH_B, use_pullup);
-}
-
-/*
- * mux the pin to the "C" internal peripheral role.
- */
-static inline int at91_set_C_periph(unsigned pin, int use_pullup)
-{
- return at91_mux_pin(pin, AT91_MUX_PERIPH_C, use_pullup);
-}
-
-/*
- * mux the pin to the "C" internal peripheral role.
- */
-static inline int at91_set_D_periph(unsigned pin, int use_pullup)
-{
- return at91_mux_pin(pin, AT91_MUX_PERIPH_D, use_pullup);
-}
-
-/*
- * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
- * configure it for an input.
- */
-int at91_set_gpio_input(unsigned pin, int use_pullup);
-
-/*
- * mux the pin to the gpio controller (instead of "A" or "B" peripheral),
- * and configure it for an output.
- */
-int at91_set_gpio_output(unsigned pin, int value);
-
-/*
- * enable/disable the glitch filter; mostly used with IRQ handling.
- */
-int at91_set_deglitch(unsigned pin, int is_on);
-
-/*
- * enable/disable the multi-driver; This is only valid for output and
- * allows the output pin to run as an open collector output.
- */
-int at91_set_multi_drive(unsigned pin, int is_on);
-
-extern int at91_set_debounce(unsigned pin, int is_on, int div);
-extern int at91_set_pulldown(unsigned pin, int is_on);
-extern int at91_disable_schmitt_trig(unsigned pin);
-
-#endif /* __ASM_ARCH_AT91SAM9_GPIO_H */
diff --git a/arch/arm/mach-at91/include/mach/iomux.h b/arch/arm/mach-at91/include/mach/iomux.h
new file mode 100644
index 0000000..bac7ef6
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/iomux.h
@@ -0,0 +1,266 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/gpio.h]
+ *
+ * Copyright (C) 2005 HP Labs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef __ASM_ARCH_AT91_GPIO_H
+#define __ASM_ARCH_AT91_GPIO_H
+
+#include <io.h>
+#include <asm-generic/errno.h>
+#include <mach/at91_pio.h>
+#include <mach/hardware.h>
+
+#define AT91_PIN_PA0 (0x00 + 0)
+#define AT91_PIN_PA1 (0x00 + 1)
+#define AT91_PIN_PA2 (0x00 + 2)
+#define AT91_PIN_PA3 (0x00 + 3)
+#define AT91_PIN_PA4 (0x00 + 4)
+#define AT91_PIN_PA5 (0x00 + 5)
+#define AT91_PIN_PA6 (0x00 + 6)
+#define AT91_PIN_PA7 (0x00 + 7)
+#define AT91_PIN_PA8 (0x00 + 8)
+#define AT91_PIN_PA9 (0x00 + 9)
+#define AT91_PIN_PA10 (0x00 + 10)
+#define AT91_PIN_PA11 (0x00 + 11)
+#define AT91_PIN_PA12 (0x00 + 12)
+#define AT91_PIN_PA13 (0x00 + 13)
+#define AT91_PIN_PA14 (0x00 + 14)
+#define AT91_PIN_PA15 (0x00 + 15)
+#define AT91_PIN_PA16 (0x00 + 16)
+#define AT91_PIN_PA17 (0x00 + 17)
+#define AT91_PIN_PA18 (0x00 + 18)
+#define AT91_PIN_PA19 (0x00 + 19)
+#define AT91_PIN_PA20 (0x00 + 20)
+#define AT91_PIN_PA21 (0x00 + 21)
+#define AT91_PIN_PA22 (0x00 + 22)
+#define AT91_PIN_PA23 (0x00 + 23)
+#define AT91_PIN_PA24 (0x00 + 24)
+#define AT91_PIN_PA25 (0x00 + 25)
+#define AT91_PIN_PA26 (0x00 + 26)
+#define AT91_PIN_PA27 (0x00 + 27)
+#define AT91_PIN_PA28 (0x00 + 28)
+#define AT91_PIN_PA29 (0x00 + 29)
+#define AT91_PIN_PA30 (0x00 + 30)
+#define AT91_PIN_PA31 (0x00 + 31)
+
+#define AT91_PIN_PB0 (0x20 + 0)
+#define AT91_PIN_PB1 (0x20 + 1)
+#define AT91_PIN_PB2 (0x20 + 2)
+#define AT91_PIN_PB3 (0x20 + 3)
+#define AT91_PIN_PB4 (0x20 + 4)
+#define AT91_PIN_PB5 (0x20 + 5)
+#define AT91_PIN_PB6 (0x20 + 6)
+#define AT91_PIN_PB7 (0x20 + 7)
+#define AT91_PIN_PB8 (0x20 + 8)
+#define AT91_PIN_PB9 (0x20 + 9)
+#define AT91_PIN_PB10 (0x20 + 10)
+#define AT91_PIN_PB11 (0x20 + 11)
+#define AT91_PIN_PB12 (0x20 + 12)
+#define AT91_PIN_PB13 (0x20 + 13)
+#define AT91_PIN_PB14 (0x20 + 14)
+#define AT91_PIN_PB15 (0x20 + 15)
+#define AT91_PIN_PB16 (0x20 + 16)
+#define AT91_PIN_PB17 (0x20 + 17)
+#define AT91_PIN_PB18 (0x20 + 18)
+#define AT91_PIN_PB19 (0x20 + 19)
+#define AT91_PIN_PB20 (0x20 + 20)
+#define AT91_PIN_PB21 (0x20 + 21)
+#define AT91_PIN_PB22 (0x20 + 22)
+#define AT91_PIN_PB23 (0x20 + 23)
+#define AT91_PIN_PB24 (0x20 + 24)
+#define AT91_PIN_PB25 (0x20 + 25)
+#define AT91_PIN_PB26 (0x20 + 26)
+#define AT91_PIN_PB27 (0x20 + 27)
+#define AT91_PIN_PB28 (0x20 + 28)
+#define AT91_PIN_PB29 (0x20 + 29)
+#define AT91_PIN_PB30 (0x20 + 30)
+#define AT91_PIN_PB31 (0x20 + 31)
+
+#define AT91_PIN_PC0 (0x40 + 0)
+#define AT91_PIN_PC1 (0x40 + 1)
+#define AT91_PIN_PC2 (0x40 + 2)
+#define AT91_PIN_PC3 (0x40 + 3)
+#define AT91_PIN_PC4 (0x40 + 4)
+#define AT91_PIN_PC5 (0x40 + 5)
+#define AT91_PIN_PC6 (0x40 + 6)
+#define AT91_PIN_PC7 (0x40 + 7)
+#define AT91_PIN_PC8 (0x40 + 8)
+#define AT91_PIN_PC9 (0x40 + 9)
+#define AT91_PIN_PC10 (0x40 + 10)
+#define AT91_PIN_PC11 (0x40 + 11)
+#define AT91_PIN_PC12 (0x40 + 12)
+#define AT91_PIN_PC13 (0x40 + 13)
+#define AT91_PIN_PC14 (0x40 + 14)
+#define AT91_PIN_PC15 (0x40 + 15)
+#define AT91_PIN_PC16 (0x40 + 16)
+#define AT91_PIN_PC17 (0x40 + 17)
+#define AT91_PIN_PC18 (0x40 + 18)
+#define AT91_PIN_PC19 (0x40 + 19)
+#define AT91_PIN_PC20 (0x40 + 20)
+#define AT91_PIN_PC21 (0x40 + 21)
+#define AT91_PIN_PC22 (0x40 + 22)
+#define AT91_PIN_PC23 (0x40 + 23)
+#define AT91_PIN_PC24 (0x40 + 24)
+#define AT91_PIN_PC25 (0x40 + 25)
+#define AT91_PIN_PC26 (0x40 + 26)
+#define AT91_PIN_PC27 (0x40 + 27)
+#define AT91_PIN_PC28 (0x40 + 28)
+#define AT91_PIN_PC29 (0x40 + 29)
+#define AT91_PIN_PC30 (0x40 + 30)
+#define AT91_PIN_PC31 (0x40 + 31)
+
+#define AT91_PIN_PD0 (0x60 + 0)
+#define AT91_PIN_PD1 (0x60 + 1)
+#define AT91_PIN_PD2 (0x60 + 2)
+#define AT91_PIN_PD3 (0x60 + 3)
+#define AT91_PIN_PD4 (0x60 + 4)
+#define AT91_PIN_PD5 (0x60 + 5)
+#define AT91_PIN_PD6 (0x60 + 6)
+#define AT91_PIN_PD7 (0x60 + 7)
+#define AT91_PIN_PD8 (0x60 + 8)
+#define AT91_PIN_PD9 (0x60 + 9)
+#define AT91_PIN_PD10 (0x60 + 10)
+#define AT91_PIN_PD11 (0x60 + 11)
+#define AT91_PIN_PD12 (0x60 + 12)
+#define AT91_PIN_PD13 (0x60 + 13)
+#define AT91_PIN_PD14 (0x60 + 14)
+#define AT91_PIN_PD15 (0x60 + 15)
+#define AT91_PIN_PD16 (0x60 + 16)
+#define AT91_PIN_PD17 (0x60 + 17)
+#define AT91_PIN_PD18 (0x60 + 18)
+#define AT91_PIN_PD19 (0x60 + 19)
+#define AT91_PIN_PD20 (0x60 + 20)
+#define AT91_PIN_PD21 (0x60 + 21)
+#define AT91_PIN_PD22 (0x60 + 22)
+#define AT91_PIN_PD23 (0x60 + 23)
+#define AT91_PIN_PD24 (0x60 + 24)
+#define AT91_PIN_PD25 (0x60 + 25)
+#define AT91_PIN_PD26 (0x60 + 26)
+#define AT91_PIN_PD27 (0x60 + 27)
+#define AT91_PIN_PD28 (0x60 + 28)
+#define AT91_PIN_PD29 (0x60 + 29)
+#define AT91_PIN_PD30 (0x60 + 30)
+#define AT91_PIN_PD31 (0x60 + 31)
+
+#define AT91_PIN_PE0 (0x80 + 0)
+#define AT91_PIN_PE1 (0x80 + 1)
+#define AT91_PIN_PE2 (0x80 + 2)
+#define AT91_PIN_PE3 (0x80 + 3)
+#define AT91_PIN_PE4 (0x80 + 4)
+#define AT91_PIN_PE5 (0x80 + 5)
+#define AT91_PIN_PE6 (0x80 + 6)
+#define AT91_PIN_PE7 (0x80 + 7)
+#define AT91_PIN_PE8 (0x80 + 8)
+#define AT91_PIN_PE9 (0x80 + 9)
+#define AT91_PIN_PE10 (0x80 + 10)
+#define AT91_PIN_PE11 (0x80 + 11)
+#define AT91_PIN_PE12 (0x80 + 12)
+#define AT91_PIN_PE13 (0x80 + 13)
+#define AT91_PIN_PE14 (0x80 + 14)
+#define AT91_PIN_PE15 (0x80 + 15)
+#define AT91_PIN_PE16 (0x80 + 16)
+#define AT91_PIN_PE17 (0x80 + 17)
+#define AT91_PIN_PE18 (0x80 + 18)
+#define AT91_PIN_PE19 (0x80 + 19)
+#define AT91_PIN_PE20 (0x80 + 20)
+#define AT91_PIN_PE21 (0x80 + 21)
+#define AT91_PIN_PE22 (0x80 + 22)
+#define AT91_PIN_PE23 (0x80 + 23)
+#define AT91_PIN_PE24 (0x80 + 24)
+#define AT91_PIN_PE25 (0x80 + 25)
+#define AT91_PIN_PE26 (0x80 + 26)
+#define AT91_PIN_PE27 (0x80 + 27)
+#define AT91_PIN_PE28 (0x80 + 28)
+#define AT91_PIN_PE29 (0x80 + 29)
+#define AT91_PIN_PE30 (0x80 + 30)
+#define AT91_PIN_PE31 (0x80 + 31)
+
+enum at91_mux {
+ AT91_MUX_GPIO = 0,
+ AT91_MUX_PERIPH_A = 1,
+ AT91_MUX_PERIPH_B = 2,
+ AT91_MUX_PERIPH_C = 3,
+ AT91_MUX_PERIPH_D = 4,
+};
+
+/*
+ * mux the pin
+ */
+int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup);
+
+/*
+ * mux the pin to the "GPIO" peripheral role.
+ */
+static inline int at91_set_GPIO_periph(unsigned pin, int use_pullup)
+{
+ return at91_mux_pin(pin, AT91_MUX_GPIO, use_pullup);
+}
+
+/*
+ * mux the pin to the "A" internal peripheral role.
+ */
+static inline int at91_set_A_periph(unsigned pin, int use_pullup)
+{
+ return at91_mux_pin(pin, AT91_MUX_PERIPH_A, use_pullup);
+}
+
+/*
+ * mux the pin to the "B" internal peripheral role.
+ */
+static inline int at91_set_B_periph(unsigned pin, int use_pullup)
+{
+ return at91_mux_pin(pin, AT91_MUX_PERIPH_B, use_pullup);
+}
+
+/*
+ * mux the pin to the "C" internal peripheral role.
+ */
+static inline int at91_set_C_periph(unsigned pin, int use_pullup)
+{
+ return at91_mux_pin(pin, AT91_MUX_PERIPH_C, use_pullup);
+}
+
+/*
+ * mux the pin to the "C" internal peripheral role.
+ */
+static inline int at91_set_D_periph(unsigned pin, int use_pullup)
+{
+ return at91_mux_pin(pin, AT91_MUX_PERIPH_D, use_pullup);
+}
+
+/*
+ * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
+ * configure it for an input.
+ */
+int at91_set_gpio_input(unsigned pin, int use_pullup);
+
+/*
+ * mux the pin to the gpio controller (instead of "A" or "B" peripheral),
+ * and configure it for an output.
+ */
+int at91_set_gpio_output(unsigned pin, int value);
+
+/*
+ * enable/disable the glitch filter; mostly used with IRQ handling.
+ */
+int at91_set_deglitch(unsigned pin, int is_on);
+
+/*
+ * enable/disable the multi-driver; This is only valid for output and
+ * allows the output pin to run as an open collector output.
+ */
+int at91_set_multi_drive(unsigned pin, int is_on);
+
+extern int at91_set_debounce(unsigned pin, int is_on, int div);
+extern int at91_set_pulldown(unsigned pin, int is_on);
+extern int at91_disable_schmitt_trig(unsigned pin);
+
+#endif /* __ASM_ARCH_AT91SAM9_GPIO_H */
diff --git a/arch/arm/mach-at91/sama5d3_devices.c b/arch/arm/mach-at91/sama5d3_devices.c
index 28b1ba1..9cbc8c1 100644
--- a/arch/arm/mach-at91/sama5d3_devices.c
+++ b/arch/arm/mach-at91/sama5d3_devices.c
@@ -19,6 +19,7 @@
#include <mach/at91_pmc.h>
#include <mach/at91sam9x5_matrix.h>
#include <mach/at91sam9_ddrsdr.h>
+#include <mach/iomux.h>
#include <mach/io.h>
#include <mach/cpu.h>
#include <i2c/i2c-gpio.h>
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index a0f63d8..0bf9d08 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -32,6 +32,7 @@
#include <io.h>
#include <spi/spi.h>
#include <mach/io.h>
+#include <mach/iomux.h>
#include <mach/board.h>
#include <mach/cpu.h>
#include <linux/clk.h>
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/8] ARM: MXS: move iomux definitions to iomux.h
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
` (3 preceding siblings ...)
2013-08-17 9:25 ` [PATCH 4/8] ARM: AT91: move iomux definitions to iomux.h Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 6/8] ARM: Samsung: " Sascha Hauer
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
mach/gpio.h is for the gpio API, so move unrelated stuff
away.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/chumby_falconwing/falconwing.c | 1 +
arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 1 +
arch/arm/boards/freescale-mx28-evk/mx28-evk.c | 1 +
arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c | 1 +
arch/arm/boards/karo-tx28/tx28-stk5.c | 1 +
arch/arm/boards/karo-tx28/tx28.c | 1 +
arch/arm/mach-mxs/include/mach/gpio.h | 11 --------
arch/arm/mach-mxs/include/mach/iomux.h | 30 ++++++++++++++++++++++
arch/arm/mach-mxs/iomux-imx.c | 1 +
9 files changed, 37 insertions(+), 11 deletions(-)
create mode 100644 arch/arm/mach-mxs/include/mach/iomux.h
diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index b029261..3b97551 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -30,6 +30,7 @@
#include <mach/mci.h>
#include <mach/fb.h>
#include <mach/usb.h>
+#include <mach/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
index 47f7031..3b82760 100644
--- a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
+++ b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
@@ -26,6 +26,7 @@
#include <mach/mci.h>
#include <usb/fsl_usb2.h>
#include <mach/usb.h>
+#include <mach/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/freescale-mx28-evk/mx28-evk.c b/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
index dfb1878..606ff46 100644
--- a/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
+++ b/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
@@ -29,6 +29,7 @@
#include <mach/iomux-imx28.h>
#include <mach/mci.h>
#include <mach/fb.h>
+#include <mach/iomux.h>
#include <mach/ocotp.h>
#include <mach/devices.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c b/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
index ce59a2a..dc8a099 100644
--- a/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
+++ b/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
@@ -35,6 +35,7 @@
#include <mach/imx-regs.h>
#include <mach/clock.h>
#include <mach/mci.h>
+#include <mach/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c
index a1b161a..8e8b62c 100644
--- a/arch/arm/boards/karo-tx28/tx28-stk5.c
+++ b/arch/arm/boards/karo-tx28/tx28-stk5.c
@@ -28,6 +28,7 @@
#include <mach/mci.h>
#include <mach/fb.h>
#include <mach/ocotp.h>
+#include <mach/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA,
diff --git a/arch/arm/boards/karo-tx28/tx28.c b/arch/arm/boards/karo-tx28/tx28.c
index 4cacca3..198d212 100644
--- a/arch/arm/boards/karo-tx28/tx28.c
+++ b/arch/arm/boards/karo-tx28/tx28.c
@@ -22,6 +22,7 @@
#include <generated/mach-types.h>
#include <mach/imx-regs.h>
#include <mach/devices.h>
+#include <mach/iomux.h>
#include <asm/mmu.h>
/* setup the CPU card internal signals */
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h
index 4e7c8fe..8643c98 100644
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ b/arch/arm/mach-mxs/include/mach/gpio.h
@@ -16,17 +16,6 @@
#ifndef __ASM_MACH_GPIO_H
#define __ASM_MACH_GPIO_H
-#include <types.h>
-
-#if defined CONFIG_ARCH_IMX23
-# include <mach/iomux-imx23.h>
-#endif
-#if defined CONFIG_ARCH_IMX28
-# include <mach/iomux-imx28.h>
-#endif
-
#include <asm-generic/gpio.h>
-void imx_gpio_mode(uint32_t);
-
#endif /* __ASM_MACH_GPIO_H */
diff --git a/arch/arm/mach-mxs/include/mach/iomux.h b/arch/arm/mach-mxs/include/mach/iomux.h
new file mode 100644
index 0000000..84496c6
--- /dev/null
+++ b/arch/arm/mach-mxs/include/mach/iomux.h
@@ -0,0 +1,30 @@
+/*
+ * (C) Copyright 2010 Juergen Beisert - Pengutronix
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __ASM_MACH_IOMUX_H
+#define __ASM_MACH_IOMUX_H
+
+#include <types.h>
+
+#if defined CONFIG_ARCH_IMX23
+# include <mach/iomux-imx23.h>
+#endif
+#if defined CONFIG_ARCH_IMX28
+# include <mach/iomux-imx28.h>
+#endif
+
+void imx_gpio_mode(uint32_t);
+
+#endif /* __ASM_MACH_IOMUX_H */
diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
index 3d26302..b8b69b3 100644
--- a/arch/arm/mach-mxs/iomux-imx.c
+++ b/arch/arm/mach-mxs/iomux-imx.c
@@ -18,6 +18,7 @@
#include <gpio.h>
#include <errno.h>
#include <io.h>
+#include <mach/iomux.h>
#include <stmp-device.h>
#include <mach/imx-regs.h>
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/8] ARM: Samsung: move iomux definitions to iomux.h
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
` (4 preceding siblings ...)
2013-08-17 9:25 ` [PATCH 5/8] ARM: MXS: " Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 7/8] ARM: i.MX: " Sascha Hauer
2013-08-17 9:25 ` [PATCH 8/8] ARM: remove include of mach/gpio.h for gpiolib users Sascha Hauer
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
mach/gpio.h is for the gpio API, so move unrelated stuff
away.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/friendlyarm-mini2440/mini2440.c | 1 +
arch/arm/boards/friendlyarm-mini6410/mini6410.c | 1 +
arch/arm/boards/friendlyarm-tiny210/tiny210.c | 1 +
.../friendlyarm-tiny6410/development-board.c | 1 +
arch/arm/boards/friendlyarm-tiny6410/tiny6410.c | 1 +
arch/arm/mach-samsung/gpio-s3c24x0.c | 1 +
arch/arm/mach-samsung/gpio-s3c64xx.c | 1 +
arch/arm/mach-samsung/gpio-s5pcxx.c | 1 +
arch/arm/mach-samsung/include/mach/gpio.h | 12 ----------
arch/arm/mach-samsung/include/mach/iomux.h | 28 ++++++++++++++++++++++
10 files changed, 36 insertions(+), 12 deletions(-)
create mode 100644 arch/arm/mach-samsung/include/mach/iomux.h
diff --git a/arch/arm/boards/friendlyarm-mini2440/mini2440.c b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
index aec3e67..cf96183 100644
--- a/arch/arm/boards/friendlyarm-mini2440/mini2440.c
+++ b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
@@ -35,6 +35,7 @@
#include <asm/sections.h>
#include <io.h>
#include <gpio.h>
+#include <mach/iomux.h>
#include <mach/s3c-iomap.h>
#include <mach/devices-s3c24xx.h>
#include <mach/s3c24xx-nand.h>
diff --git a/arch/arm/boards/friendlyarm-mini6410/mini6410.c b/arch/arm/boards/friendlyarm-mini6410/mini6410.c
index 01437ac..ebe97f0 100644
--- a/arch/arm/boards/friendlyarm-mini6410/mini6410.c
+++ b/arch/arm/boards/friendlyarm-mini6410/mini6410.c
@@ -21,6 +21,7 @@
#include <mach/s3c-iomap.h>
#include <mach/devices-s3c64xx.h>
#include <mach/s3c-generic.h>
+#include <mach/iomux.h>
/*
* dm9000 network controller onboard
diff --git a/arch/arm/boards/friendlyarm-tiny210/tiny210.c b/arch/arm/boards/friendlyarm-tiny210/tiny210.c
index fb144f5..c78e9df 100644
--- a/arch/arm/boards/friendlyarm-tiny210/tiny210.c
+++ b/arch/arm/boards/friendlyarm-tiny210/tiny210.c
@@ -35,6 +35,7 @@
#include <io.h>
#include <nand.h>
#include <asm/armlinux.h>
+#include <mach/iomux.h>
#include <mach/s3c-iomap.h>
#include <mach/s3c-clocks.h>
#include <mach/s3c-generic.h>
diff --git a/arch/arm/boards/friendlyarm-tiny6410/development-board.c b/arch/arm/boards/friendlyarm-tiny6410/development-board.c
index bf339d3..2bcb7df 100644
--- a/arch/arm/boards/friendlyarm-tiny6410/development-board.c
+++ b/arch/arm/boards/friendlyarm-tiny6410/development-board.c
@@ -26,6 +26,7 @@
#include <dm9000.h>
#include <mach/devices-s3c64xx.h>
#include <mach/s3c-generic.h>
+#include <mach/iomux.h>
#include "tiny6410.h"
diff --git a/arch/arm/boards/friendlyarm-tiny6410/tiny6410.c b/arch/arm/boards/friendlyarm-tiny6410/tiny6410.c
index db13c06..97dc322 100644
--- a/arch/arm/boards/friendlyarm-tiny6410/tiny6410.c
+++ b/arch/arm/boards/friendlyarm-tiny6410/tiny6410.c
@@ -19,6 +19,7 @@
#include <asm/armlinux.h>
#include <mach/s3c-iomap.h>
#include <mach/s3c-generic.h>
+#include <mach/iomux.h>
static const unsigned tiny6410_pin_usage[] = {
/* UART0 */
diff --git a/arch/arm/mach-samsung/gpio-s3c24x0.c b/arch/arm/mach-samsung/gpio-s3c24x0.c
index 36b2db4..f62588f 100644
--- a/arch/arm/mach-samsung/gpio-s3c24x0.c
+++ b/arch/arm/mach-samsung/gpio-s3c24x0.c
@@ -17,6 +17,7 @@
#include <mach/s3c-iomap.h>
#include <mach/gpio.h>
#include <mach/s3c24xx-gpio.h>
+#include <mach/iomux.h>
static const unsigned char group_offset[] =
{
diff --git a/arch/arm/mach-samsung/gpio-s3c64xx.c b/arch/arm/mach-samsung/gpio-s3c64xx.c
index ee68261..d70a871 100644
--- a/arch/arm/mach-samsung/gpio-s3c64xx.c
+++ b/arch/arm/mach-samsung/gpio-s3c64xx.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <io.h>
#include <gpio.h>
+#include <mach/iomux.h>
#include <mach/s3c-iomap.h>
#define S3C_GPACON (S3C_GPIO_BASE)
diff --git a/arch/arm/mach-samsung/gpio-s5pcxx.c b/arch/arm/mach-samsung/gpio-s5pcxx.c
index 604a63f..1a422f1 100644
--- a/arch/arm/mach-samsung/gpio-s5pcxx.c
+++ b/arch/arm/mach-samsung/gpio-s5pcxx.c
@@ -24,6 +24,7 @@
#include <errno.h>
#include <io.h>
#include <gpio.h>
+#include <mach/iomux.h>
#include <mach/s3c-iomap.h>
#define S3C_GPACON (S3C_GPIO_BASE)
diff --git a/arch/arm/mach-samsung/include/mach/gpio.h b/arch/arm/mach-samsung/include/mach/gpio.h
index 9e64a84..3920667 100644
--- a/arch/arm/mach-samsung/include/mach/gpio.h
+++ b/arch/arm/mach-samsung/include/mach/gpio.h
@@ -13,18 +13,6 @@
#ifndef __ASM_MACH_GPIO_H
#define __ASM_MACH_GPIO_H
-#ifdef CONFIG_ARCH_S3C24xx
-# include <mach/iomux-s3c24x0.h>
-#endif
-#ifdef CONFIG_ARCH_S3C64xx
-# include <mach/iomux-s3c64xx.h>
-#endif
-#ifdef CONFIG_ARCH_S5PCxx
-# include <mach/iomux-s5pcxx.h>
-#endif
-
#include <asm-generic/gpio.h>
-void s3c_gpio_mode(unsigned);
-
#endif /* __ASM_MACH_GPIO_H */
diff --git a/arch/arm/mach-samsung/include/mach/iomux.h b/arch/arm/mach-samsung/include/mach/iomux.h
new file mode 100644
index 0000000..48651d8
--- /dev/null
+++ b/arch/arm/mach-samsung/include/mach/iomux.h
@@ -0,0 +1,28 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_MACH_IOMUX_H
+#define __ASM_MACH_IOMUX_H
+
+#ifdef CONFIG_ARCH_S3C24xx
+# include <mach/iomux-s3c24x0.h>
+#endif
+#ifdef CONFIG_ARCH_S3C64xx
+# include <mach/iomux-s3c64xx.h>
+#endif
+#ifdef CONFIG_ARCH_S5PCxx
+# include <mach/iomux-s5pcxx.h>
+#endif
+
+void s3c_gpio_mode(unsigned);
+
+#endif /* __ASM_MACH_IOMUX_H */
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 7/8] ARM: i.MX: move iomux definitions to iomux.h
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
` (5 preceding siblings ...)
2013-08-17 9:25 ` [PATCH 6/8] ARM: Samsung: " Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
2013-08-17 9:25 ` [PATCH 8/8] ARM: remove include of mach/gpio.h for gpiolib users Sascha Hauer
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
mach/gpio.h is for the gpio API, so move unrelated stuff
away.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/include/mach/gpio.h | 2 --
arch/arm/mach-imx/include/mach/iomux-v1.h | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/gpio.h b/arch/arm/mach-imx/include/mach/gpio.h
index 489ae2c..fee693e 100644
--- a/arch/arm/mach-imx/include/mach/gpio.h
+++ b/arch/arm/mach-imx/include/mach/gpio.h
@@ -3,6 +3,4 @@
#include <asm-generic/gpio.h>
-void imx_gpio_mode(int gpio_mode);
-
#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-imx/include/mach/iomux-v1.h b/arch/arm/mach-imx/include/mach/iomux-v1.h
index 49dcecd..e822905 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v1.h
+++ b/arch/arm/mach-imx/include/mach/iomux-v1.h
@@ -46,5 +46,6 @@
#define GPIO_GIUS (1 << 16)
void imx_iomuxv1_init(void __iomem *base);
+void imx_gpio_mode(int gpio_mode);
#endif /* __MACH_IOMUX_V1_H__ */
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 8/8] ARM: remove include of mach/gpio.h for gpiolib users
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
` (6 preceding siblings ...)
2013-08-17 9:25 ` [PATCH 7/8] ARM: i.MX: " Sascha Hauer
@ 2013-08-17 9:25 ` Sascha Hauer
7 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-08-17 9:25 UTC (permalink / raw)
To: barebox
gpiolib user have nothing to define in their machine
specific gpio.h, so do not include it.
The only thing they could define would be ARCH_NR_GPIOS,
but currently no architecture defines it. Should an architecure
feel the need to do it this would be a good opportunity to
get rid of this limitation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/include/asm/gpio.h | 5 ++++-
arch/arm/mach-bcm2835/include/mach/gpio.h | 1 -
arch/arm/mach-clps711x/include/mach/gpio.h | 3 ---
arch/arm/mach-highbank/include/mach/gpio.h | 1 -
arch/arm/mach-imx/include/mach/gpio.h | 6 ------
arch/arm/mach-mvebu/include/mach/gpio.h | 6 ------
arch/arm/mach-omap/include/mach/gpio.h | 1 -
arch/arm/mach-tegra/include/mach/gpio.h | 1 -
8 files changed, 4 insertions(+), 20 deletions(-)
delete mode 100644 arch/arm/mach-bcm2835/include/mach/gpio.h
delete mode 100644 arch/arm/mach-clps711x/include/mach/gpio.h
delete mode 100644 arch/arm/mach-highbank/include/mach/gpio.h
delete mode 100644 arch/arm/mach-imx/include/mach/gpio.h
delete mode 100644 arch/arm/mach-mvebu/include/mach/gpio.h
delete mode 100644 arch/arm/mach-omap/include/mach/gpio.h
delete mode 100644 arch/arm/mach-tegra/include/mach/gpio.h
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 166a7a3..b3c1efe 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -1,7 +1,10 @@
#ifndef _ARCH_ARM_GPIO_H
#define _ARCH_ARM_GPIO_H
-/* not all ARM platforms necessarily support this API ... */
+#ifndef CONFIG_GPIOLIB
#include <mach/gpio.h>
+#else
+#include <asm-generic/gpio.h>
+#endif
#endif /* _ARCH_ARM_GPIO_H */
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h
deleted file mode 100644
index 306ab4c..0000000
--- a/arch/arm/mach-bcm2835/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/gpio.h>
diff --git a/arch/arm/mach-clps711x/include/mach/gpio.h b/arch/arm/mach-clps711x/include/mach/gpio.h
deleted file mode 100644
index 3428fe5..0000000
--- a/arch/arm/mach-clps711x/include/mach/gpio.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <asm-generic/gpio.h>
-
-#define CLPS711X_GPIO(prt,bit) ((prt) * 8 + (bit))
diff --git a/arch/arm/mach-highbank/include/mach/gpio.h b/arch/arm/mach-highbank/include/mach/gpio.h
deleted file mode 100644
index 306ab4c..0000000
--- a/arch/arm/mach-highbank/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/gpio.h>
diff --git a/arch/arm/mach-imx/include/mach/gpio.h b/arch/arm/mach-imx/include/mach/gpio.h
deleted file mode 100644
index fee693e..0000000
--- a/arch/arm/mach-imx/include/mach/gpio.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ASM_ARCH_GPIO_H
-#define __ASM_ARCH_GPIO_H
-
-#include <asm-generic/gpio.h>
-
-#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-mvebu/include/mach/gpio.h b/arch/arm/mach-mvebu/include/mach/gpio.h
deleted file mode 100644
index fee693e..0000000
--- a/arch/arm/mach-mvebu/include/mach/gpio.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ASM_ARCH_GPIO_H
-#define __ASM_ARCH_GPIO_H
-
-#include <asm-generic/gpio.h>
-
-#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-omap/include/mach/gpio.h b/arch/arm/mach-omap/include/mach/gpio.h
deleted file mode 100644
index 306ab4c..0000000
--- a/arch/arm/mach-omap/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/gpio.h>
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
deleted file mode 100644
index 306ab4c..0000000
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/gpio.h>
--
1.8.4.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-08-17 9:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-17 9:25 [PATCH] cleanup gpio includes Sascha Hauer
2013-08-17 9:25 ` [PATCH 1/8] ARM: AT91: Add missing include Sascha Hauer
2013-08-17 9:25 ` [PATCH 2/8] ARM: include <gpio.h> instead of <mach/gpio.h> Sascha Hauer
2013-08-17 9:25 ` [PATCH 3/8] ARM: i.MX23: Fix double include protection Sascha Hauer
2013-08-17 9:25 ` [PATCH 4/8] ARM: AT91: move iomux definitions to iomux.h Sascha Hauer
2013-08-17 9:25 ` [PATCH 5/8] ARM: MXS: " Sascha Hauer
2013-08-17 9:25 ` [PATCH 6/8] ARM: Samsung: " Sascha Hauer
2013-08-17 9:25 ` [PATCH 7/8] ARM: i.MX: " Sascha Hauer
2013-08-17 9:25 ` [PATCH 8/8] ARM: remove include of mach/gpio.h for gpiolib users Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox