Skip to contentSkip to conversation

mx53loco: Use IMX_GPIO_NR macro

PATCH New Fabio Estevam 3 participants 7 messages Aug 21, 2012 – Aug 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 mx53loco: Use IMX_GPIO_NR macro

Use IMX_GPIO_NR macro.

---
 board/freescale/mx53loco/mx53loco.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx53loco/mx53loco.c +1 -1
index 7cfb3f4..3a39c3e 100644
@@ -42,7 +42,7 @@
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>
 
-#define MX53LOCO_LCD_POWER		(2 * 32 + 24)	/* GPIO3_24 */
+#define MX53LOCO_LCD_POWER		IMX_GPIO_NR(3, 24)	/* GPIO3_24 */
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/3 mx51evk: Use IMX_GPIO_NR macro

Use IMX_GPIO_NR macro.

---
 board/freescale/mx51evk/mx51evk.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx51evk/mx51evk.c +3 -3
index 97c8a2c..651b506 100644
@@ -39,9 +39,9 @@
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>
 
-#define MX51EVK_LCD_3V3		(3 * 32 + 9)	/* GPIO4_9 */
-#define MX51EVK_LCD_5V		(3 * 32 + 10)	/* GPIO4_10 */
-#define MX51EVK_LCD_BACKLIGHT	(2 * 32 + 4)	/* GPIO3_4 */
+#define MX51EVK_LCD_3V3		IMX_GPIO_NR(4, 9)	/* GPIO4_9 */
+#define MX51EVK_LCD_5V		IMX_GPIO_NR(4, 10)	/* GPIO4_10 */
+#define MX51EVK_LCD_BACKLIGHT	IMX_GPIO_NR(3, 4)	/* GPIO3_4 */
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/3 mx51evk: Use IMX_GPIO_NR macro

Quoted 15 lines · Fabio Estevam

Use IMX_GPIO_NR macro.

---
 board/freescale/mx51evk/mx51evk.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx51evk/mx51evk.c +0 -0
index 97c8a2c..651b506 100644
@@ -39,9 +39,9 @@
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>

board/freescale/mx51evk/mx51evk.c line 47

Quoted 10 lines
board/freescale/mx51evk/mx51evk.c +3 -3
 
-#define MX51EVK_LCD_3V3		(3 * 32 + 9)	/* GPIO4_9 */
-#define MX51EVK_LCD_5V		(3 * 32 + 10)	/* GPIO4_10 */
-#define MX51EVK_LCD_BACKLIGHT	(2 * 32 + 4)	/* GPIO3_4 */
+#define MX51EVK_LCD_3V3		IMX_GPIO_NR(4, 9)	/* GPIO4_9 */
+#define MX51EVK_LCD_5V		IMX_GPIO_NR(4, 10)	/* GPIO4_10 */
+#define MX51EVK_LCD_BACKLIGHT	IMX_GPIO_NR(3, 4)	/* GPIO3_4 */
 
 DECLARE_GLOBAL_DATA_PTR;
 

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 3/3 mx53ard: Use IMX_GPIO_NR macro

In reply to Fabio Estevam

Use IMX_GPIO_NR macro.

---
 board/freescale/mx53ard/mx53ard.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx53ard/mx53ard.c +1 -1
index 2d21584..688cff1 100644
@@ -33,7 +33,7 @@
 #include <fsl_esdhc.h>
 #include <asm/gpio.h>
 
-#define ETHERNET_INT		(1 * 32 + 31)  /* GPIO2_31 */
+#define ETHERNET_INT		IMX_GPIO_NR(2, 31)  /* GPIO2_31 */
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 3/3 mx53ard: Use IMX_GPIO_NR macro

Quoted 13 lines · Fabio Estevam

Use IMX_GPIO_NR macro.

---
 board/freescale/mx53ard/mx53ard.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx53ard/mx53ard.c +0 -0
index 2d21584..688cff1 100644

board/freescale/mx53ard/mx53ard.c line 39

Quoted 8 lines
board/freescale/mx53ard/mx53ard.c +1 -1
@@ -33,7 +33,7 @@
 #include <fsl_esdhc.h>
 #include <asm/gpio.h>
 
-#define ETHERNET_INT		(1 * 32 + 31)  /* GPIO2_31 */
+#define ETHERNET_INT		IMX_GPIO_NR(2, 31)  /* GPIO2_31 */
 
 DECLARE_GLOBAL_DATA_PTR;
 

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#5 lore raw

PATCH 1/3 mx53loco: Use IMX_GPIO_NR macro

In reply to Fabio Estevam
Quoted 12 lines · Fabio Estevam

Use IMX_GPIO_NR macro.

---
  board/freescale/mx53loco/mx53loco.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx53loco/mx53loco.c +0 -0
index 7cfb3f4..3a39c3e 100644

board/freescale/mx53loco/mx53loco.c line 48

Quoted 8 lines
board/freescale/mx53loco/mx53loco.c +1 -1
@@ -42,7 +42,7 @@
  #include <linux/fb.h>
  #include <ipu_pixfmt.h>
 
-#define MX53LOCO_LCD_POWER		(2 * 32 + 24)	/* GPIO3_24 */
+#define MX53LOCO_LCD_POWER		IMX_GPIO_NR(3, 24)	/* GPIO3_24 */
 
  DECLARE_GLOBAL_DATA_PTR;
 

I'd kill the now redundant comment as well. But I don't mind if you don't.

#6 lore raw

PATCH 1/3 mx53loco: Use IMX_GPIO_NR macro

In reply to Fabio Estevam
Quoted 13 lines · Fabio Estevam

Use IMX_GPIO_NR macro.

---
 board/freescale/mx53loco/mx53loco.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx53loco/mx53loco.c +0 -0
index 7cfb3f4..3a39c3e 100644

board/freescale/mx53loco/mx53loco.c line 48

Quoted 8 lines
board/freescale/mx53loco/mx53loco.c +1 -1
@@ -42,7 +42,7 @@
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>
 
-#define MX53LOCO_LCD_POWER		(2 * 32 + 24)	/* GPIO3_24 */
+#define MX53LOCO_LCD_POWER		IMX_GPIO_NR(3, 24)	/* GPIO3_24 */
 
 DECLARE_GLOBAL_DATA_PTR;
 

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================