Re: [U-Boot] [PATCH V4 2/2] imx: mx27 remove redundant macro

2015-05-14 Thread Fabio Estevam
Hi Peng,

On Thu, May 14, 2015 at 7:03 AM, Peng Fan peng@freescale.com wrote:
 Use common macro in iomux-v3.h, remove redundant macro.

This is a bit misleading.

mx27 iomux is not compatible to iomux-v3.h at all.

Regards,

Fabio Estevam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/2] imx: mx27 remove redundant macro

2015-05-14 Thread Simon Glass
Hi,

On 14 May 2015 at 09:31, Fabio Estevam feste...@gmail.com wrote:
 Hi Peng,

 On Thu, May 14, 2015 at 7:03 AM, Peng Fan peng@freescale.com wrote:
 Use common macro in iomux-v3.h, remove redundant macro.

 This is a bit misleading.

 mx27 iomux is not compatible to iomux-v3.h at all.

If you'd like to respin this patch I can accept it up until tomorrow
morning, when I hope to send a pull request. If you would rather that
I drop this patch, then I can drop both (since the other one depends
on this one).

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/2] imx: mx27 remove redundant macro

2015-05-14 Thread Simon Glass
On 14 May 2015 at 04:03, Peng Fan peng@freescale.com wrote:
 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(-)

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/2] imx: mx27 remove redundant macro

2015-05-14 Thread Fan Peng
Hi,

On 5/15/2015 12:31 AM, Simon Glass wrote:
 Hi,

 On 14 May 2015 at 09:31, Fabio Estevam feste...@gmail.com wrote:
 Hi Peng,

 On Thu, May 14, 2015 at 7:03 AM, Peng Fan peng@freescale.com wrote:
 Use common macro in iomux-v3.h, remove redundant macro.
 This is a bit misleading.

 mx27 iomux is not compatible to iomux-v3.h at all.
Ok. I am not familiar with mx27. I'll move the GPIO_PORT[A,B,Cxxx] to 
gpio.h, but not in imx-regs.h for mx27.
 If you'd like to respin this patch I can accept it up until tomorrow
 morning, when I hope to send a pull request. If you would rather that
 I drop this patch, then I can drop both (since the other one depends
 on this one).
I'll respin this patch. If this delays your PR, you can drop them first. 
I'll  resend out patch v5 soon.

 Regards,
 Simon
Regards,
Peng.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4 2/2] imx: mx27 remove redundant macro

2015-05-14 Thread Peng Fan
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