deleted file mode 100644
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2011
- * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-#ifndef __ASM_ARCH_MX25_GPIO_H
-#define __ASM_ARCH_MX25_GPIO_H
-
-
-/* GPIO registers */
-struct gpio_regs {
- u32 gpio_dr; /* data */
- u32 gpio_dir; /* direction */
- u32 psr; /* pad satus */
- u32 icr1; /* interrupt config 1 */
- u32 icr2; /* interrupt config 2 */
- u32 imr; /* interrupt mask */
- u32 isr; /* interrupt status */
- u32 edge_sel; /* edge select */
-};
-
-#endif
deleted file mode 100644
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2011
- * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-#ifndef __ASM_ARCH_MX31_GPIO_H
-#define __ASM_ARCH_MX31_GPIO_H
-
-/* GPIO Registers */
-struct gpio_regs {
- u32 gpio_dr;
- u32 gpio_dir;
- u32 gpio_psr;
-};
-
-#endif
deleted file mode 100644
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011
- * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-#ifndef __ASM_ARCH_MX35_GPIO_H
-#define __ASM_ARCH_MX35_GPIO_H
-
-/* GPIO registers */
-struct gpio_regs {
- u32 gpio_dr; /* data */
- u32 gpio_dir; /* direction */
- u32 psr; /* pad satus */
- u32 icr1; /* interrupt config 1 */
- u32 icr2; /* interrupt config 2 */
- u32 imr; /* interrupt mask */
- u32 isr; /* interrupt status */
- u32 edge_sel; /* edge select */
-};
-
-#endif
deleted file mode 100644
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2011
- * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-#ifndef __ASM_ARCH_MX5_GPIO_H
-#define __ASM_ARCH_MX5_GPIO_H
-
-/* GPIO registers */
-struct gpio_regs {
- u32 gpio_dr;
- u32 gpio_dir;
- u32 gpio_psr;
-};
-
-#endif
@@ -33,7 +33,7 @@
#include <asm/arch/iomux.h>
#include <i2c.h>
#include <linux/types.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/sys_proto.h>
#include <netdev.h>
@@ -25,7 +25,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <fpga.h>
#include <lattice.h>
#include "qong_fpga.h"
@@ -30,7 +30,7 @@
#include <nand.h>
#include <pmic.h>
#include <fsl_pmic.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include "qong_fpga.h"
#include <watchdog.h>
@@ -24,7 +24,7 @@
*/
#include <common.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux-mx28.h>
@@ -28,7 +28,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx5x_pins.h>
#include <asm/arch/iomux.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <usb/ehci-fsl.h>
#include <usb/ulpi.h>
#include <errno.h>
@@ -27,7 +27,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx5x_pins.h>
#include <asm/arch/iomux.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/errno.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/crm_regs.h>
@@ -32,7 +32,7 @@
#include <netdev.h>
#include <mmc.h>
#include <fsl_esdhc.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
/* NOR flash configuration */
#define IMA3_MX53_CS0GCR1 (CSEN | DSZ(2))
@@ -24,7 +24,7 @@
*/
#include <common.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux-mx28.h>
@@ -35,7 +35,7 @@
#include <mc9sdz60.h>
#include <mc13892.h>
#include <linux/types.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/sys_proto.h>
#include <netdev.h>
@@ -22,7 +22,7 @@
#include <common.h>
#include <asm/io.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx5x_pins.h>
#include <asm/arch/iomux.h>
@@ -31,7 +31,7 @@
#include <netdev.h>
#include <mmc.h>
#include <fsl_esdhc.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#define ETHERNET_INT (1 * 32 + 31) /* GPIO2_31 */
@@ -34,7 +34,7 @@
#include <fsl_esdhc.h>
#include <pmic.h>
#include <fsl_pmic.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <mc13892.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -35,7 +35,7 @@
#include <i2c.h>
#include <mmc.h>
#include <fsl_esdhc.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <pmic.h>
#include <dialog_pmic.h>
#include <fsl_pmic.h>
@@ -27,7 +27,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/iomux.h>
-#include <asm/errno.h>
+#include <asm-generic/errno.h>
#include <netdev.h>
#include <mmc.h>
#include <fsl_esdhc.h>
@@ -26,7 +26,7 @@
#include <asm/arch/mx6x_pins.h>
#include <asm/arch/iomux-v3.h>
#include <asm/errno.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <mmc.h>
#include <fsl_esdhc.h>
#include <miiphy.h>
@@ -27,7 +27,7 @@
#include <asm/arch/iomux-v3.h>
#include <asm/arch/clock.h>
#include <asm/errno.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <mmc.h>
#include <fsl_esdhc.h>
#include <micrel.h>
@@ -28,7 +28,7 @@
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/imx25-pinmux.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -29,7 +29,7 @@
*
*/
#include <common.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/imx25-pinmux.h>
@@ -29,7 +29,7 @@
#include <asm/arch/mx5x_pins.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/iomux.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/sys_proto.h>
#include <i2c.h>
#include <mmc.h>
@@ -9,7 +9,7 @@
#include <common.h>
#include <command.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#ifndef name_to_gpio
#define name_to_gpio(name) simple_strtoul(name, NULL, 10)
@@ -25,7 +25,7 @@
*/
#include <common.h>
#include <asm/arch/imx-regs.h>
-#include <asm/gpio.h>
+#include "mxc_gpio.h"
#include <asm/io.h>
#include <errno.h>
similarity index 85%
rename from arch/arm/include/asm/arch-mx6/gpio.h
rename to drivers/gpio/mxc_gpio.h
@@ -22,14 +22,14 @@
*/
-#ifndef __ASM_ARCH_MX6_GPIO_H
-#define __ASM_ARCH_MX6_GPIO_H
+#ifndef __IMX_GPIO_H
+#define __IMX_GPIO_H
/* GPIO registers */
struct gpio_regs {
- u32 gpio_dr;
- u32 gpio_dir;
- u32 gpio_psr;
+ u32 gpio_dr; /* data */
+ u32 gpio_dir; /* direction */
+ u32 gpio_psr; /* pad satus */
};
-#endif /* __ASM_ARCH_MX6_GPIO_H */
+#endif /* __IMX_GPIO_H */
@@ -23,7 +23,7 @@
#include <spi.h>
#include <asm/errno.h>
#include <asm/io.h>
-#include <asm/gpio.h>
+#include <asm-generic/gpio.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
Remove redundant gpio_regs structure for every board and define a common header for gpio_regs in the drivers/gpio directory. All the board files needs to be changed to point to asm-generic/gpio.h for gpio_* functions. Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Cc: John Rigby <jcrigby@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> --- arch/arm/include/asm/arch-mx25/gpio.h | 41 -------------------- arch/arm/include/asm/arch-mx31/gpio.h | 35 ----------------- arch/arm/include/asm/arch-mx35/gpio.h | 40 ------------------- arch/arm/include/asm/arch-mx5/gpio.h | 35 ----------------- board/CarMediaLab/flea3/flea3.c | 2 +- board/davedenx/qong/fpga.c | 2 +- board/davedenx/qong/qong.c | 2 +- board/denx/m28evk/m28evk.c | 2 +- board/efikamx/efikamx-usb.c | 2 +- board/efikamx/efikamx.c | 2 +- board/esg/ima3-mx53/ima3-mx53.c | 2 +- board/freescale/mx28evk/mx28evk.c | 2 +- board/freescale/mx35pdk/mx35pdk.c | 2 +- board/freescale/mx51evk/mx51evk.c | 2 +- board/freescale/mx53ard/mx53ard.c | 2 +- board/freescale/mx53evk/mx53evk.c | 2 +- board/freescale/mx53loco/mx53loco.c | 2 +- board/freescale/mx53smd/mx53smd.c | 2 +- board/freescale/mx6qarm2/mx6qarm2.c | 2 +- board/freescale/mx6qsabrelite/mx6qsabrelite.c | 2 +- board/karo/tx25/tx25.c | 2 +- board/syteco/zmx25/zmx25.c | 2 +- board/ttcontrol/vision2/vision2.c | 2 +- common/cmd_gpio.c | 2 +- drivers/gpio/mxc_gpio.c | 2 +- .../asm/arch-mx6/gpio.h => drivers/gpio/mxc_gpio.h | 12 +++--- drivers/spi/mxc_spi.c | 2 +- 27 files changed, 28 insertions(+), 179 deletions(-) delete mode 100644 arch/arm/include/asm/arch-mx25/gpio.h delete mode 100644 arch/arm/include/asm/arch-mx31/gpio.h delete mode 100644 arch/arm/include/asm/arch-mx35/gpio.h delete mode 100644 arch/arm/include/asm/arch-mx5/gpio.h rename arch/arm/include/asm/arch-mx6/gpio.h => drivers/gpio/mxc_gpio.h (85%)