Use common macro in iomux-v3.h, remove redundant macro.
Signed-off-by: Peng Fan peng@freescale.com
---
Changes v4:
New patch.
we include mxc_i2c.h in driver/i2c/mxc_i2c.c in patch 1/2.
mxc_i2c.h includes iomux-v3.h.
Since iomux-v3.h have some macros which also exists in
asm/arch-xx/imx-regs.h, this will introudce compile warnings
such as redefined macro.
Changes v3:
none
Changes v2:
none
arch/arm/cpu/arm926ejs/mx27/generic.c | 1 +
arch/arm/include/asm/arch-mx27/imx-regs.h | 22 --
arch/arm/include/asm/imx-common/iomux-v3.h | 22 --
board/armadeus/apf27/apf27.c | 1 +
board/armadeus/apf27/fpga.c| 1 +
board/logicpd/imx27lite/imx27lite.c| 1 +
6 files changed, 20 insertions(+), 28 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c
b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 5ee9f07..53d52e5 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -12,6 +12,7 @@
#include asm/arch/imx-regs.h
#include asm/arch/clock.h
#include asm/arch/gpio.h
+#include asm/imx-common/iomux-v3.h
#ifdef CONFIG_MXC_MMC
#include asm/arch/mxcmmc.h
#endif
diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h
b/arch/arm/include/asm/arch-mx27/imx-regs.h
index 92c847e..7402e31 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
@@ -138,16 +138,6 @@ struct gpt_regs {
u32 gpt_tstat;
};
-/*
- * GPIO Module and I/O Multiplexer
- */
-#define PORTA 0
-#define PORTB 1
-#define PORTC 2
-#define PORTD 3
-#define PORTE 4
-#define PORTF 5
-
/* IIM Control Registers */
struct iim_regs {
u32 iim_stat;
@@ -449,18 +439,6 @@ struct fuse_bank0_regs {
#define GPIO5_BASE_ADDR 0x10015400
#define GPIO6_BASE_ADDR 0x10015500
-#define GPIO_PIN_MASK 0x1f
-
-#define GPIO_PORT_SHIFT5
-#define GPIO_PORT_MASK (0x7 GPIO_PORT_SHIFT)
-
-#define GPIO_PORTA (PORTA GPIO_PORT_SHIFT)
-#define GPIO_PORTB (PORTB GPIO_PORT_SHIFT)
-#define GPIO_PORTC (PORTC GPIO_PORT_SHIFT)
-#define GPIO_PORTD (PORTD GPIO_PORT_SHIFT)
-#define GPIO_PORTE (PORTE GPIO_PORT_SHIFT)
-#define GPIO_PORTF (PORTF GPIO_PORT_SHIFT)
-
#define GPIO_OUT (1 8)
#define GPIO_IN(0 8)
#define GPIO_PUEN (1 9)
diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h
b/arch/arm/include/asm/imx-common/iomux-v3.h
index e0a49be..086486c 100644
--- a/arch/arm/include/asm/imx-common/iomux-v3.h
+++ b/arch/arm/include/asm/imx-common/iomux-v3.h
@@ -169,15 +169,25 @@ typedef u64 iomux_v3_cfg_t;
#define IOMUX_CONFIG_SION 0x10
+/*
+ * GPIO Module and I/O Multiplexer
+ */
+#define PORTA 0
+#define PORTB 1
+#define PORTC 2
+#define PORTD 3
+#define PORTE 4
+#define PORTF 5
+
#define GPIO_PIN_MASK 0x1f
#define GPIO_PORT_SHIFT5
#define GPIO_PORT_MASK (0x7 GPIO_PORT_SHIFT)
-#define GPIO_PORTA (0 GPIO_PORT_SHIFT)
-#define GPIO_PORTB (1 GPIO_PORT_SHIFT)
-#define GPIO_PORTC (2 GPIO_PORT_SHIFT)
-#define GPIO_PORTD (3 GPIO_PORT_SHIFT)
-#define GPIO_PORTE (4 GPIO_PORT_SHIFT)
-#define GPIO_PORTF (5 GPIO_PORT_SHIFT)
+#define GPIO_PORTA (PORTA GPIO_PORT_SHIFT)
+#define GPIO_PORTB (PORTB GPIO_PORT_SHIFT)
+#define GPIO_PORTC (PORTC GPIO_PORT_SHIFT)
+#define GPIO_PORTD (PORTD GPIO_PORT_SHIFT)
+#define GPIO_PORTE (PORTE GPIO_PORT_SHIFT)
+#define GPIO_PORTF (PORTF GPIO_PORT_SHIFT)
void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad);
void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list,
diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c
index 30e720d..f718e5c 100644
--- a/board/armadeus/apf27/apf27.c
+++ b/board/armadeus/apf27/apf27.c
@@ -17,6 +17,7 @@
#include asm/arch/gpio.h
#include asm/gpio.h
#include asm/errno.h
+#include asm/imx-common/iomux-v3.h
#include apf27.h
#include crc.h
#include fpga.h
diff --git a/board/armadeus/apf27/fpga.c b/board/armadeus/apf27/fpga.c
index 65a4812..af68244 100644
--- a/board/armadeus/apf27/fpga.c
+++ b/board/armadeus/apf27/fpga.c
@@ -13,6 +13,7 @@
#include asm/arch/imx-regs.h
#include asm/gpio.h
+#include asm/imx-common/iomux-v3.h
#include asm/io.h
#include command.h
#include config.h
diff --git a/board/logicpd/imx27lite/imx27lite.c
b/board/logicpd/imx27lite/imx27lite.c
index 07b07a0..576187b 100644
--- a/board/logicpd/imx27lite/imx27lite.c
+++ b/board/logicpd/imx27lite/imx27lite.c
@@ -10,6 +10,7 @@
#include asm/io.h
#include asm/arch/imx-regs.h
#include asm/gpio.h
+#include asm/imx-common/iomux-v3.h
DECLARE_GLOBAL_DATA_PTR;
--
1.8.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot