Skip to contentSkip to conversation

imx: Remove unneeded/repititive definitions from imx headers

PATCH New Vikram Narayanan 2 participants 3 messages Apr 10, 2012 – Apr 11, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 imx: Remove unneeded/repititive definitions from imx headers

Remove gpio related unused/repititive definitions from imx headers.

---
 arch/arm/include/asm/arch-mx35/mx35_pins.h |    2 --
 arch/arm/include/asm/arch-mx5/mx5x_pins.h  |    2 --
 arch/arm/include/asm/arch-mx6/imx-regs.h   |    2 --
 3 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/include/asm/arch-mx35/mx35_pins.h +0 -2
index 3676e33..8c38139 100644
@@ -84,8 +84,6 @@
 					GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
 					((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
 #define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
-#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
-#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
 
 #define NON_GPIO_I	0x7
 #define PIN_TO_MUX_MASK	((1<<(PAD_I - MUX_I)) - 1)
arch/arm/include/asm/arch-mx5/mx5x_pins.h +0 -2
index 4e3a31b..122fbee 100644
@@ -78,8 +78,6 @@
 					GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
 					((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
 #define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
-#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
-#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
 
 #define NON_GPIO_PORT		0x7
 #define PIN_TO_MUX_MASK		((1 << (PAD_I - MUX_I)) - 1)
arch/arm/include/asm/arch-mx6/imx-regs.h +0 -2
index cad957a..27ecb75 100644
@@ -168,8 +168,6 @@
 #define FEC_QUIRK_ENET_MAC
 
 #define GPIO_NUMBER(port, index)		((((port)-1)*32)+((index)&31))
-#define GPIO_TO_PORT(number)		(((number)/32)+1)
-#define GPIO_TO_INDEX(number)		((number)&31)
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/4 imx: Remove unneeded/repititive definitions from imx headers

Quoted 40 lines · Vikram Narayanan

Remove gpio related unused/repititive definitions from imx headers.

---
 arch/arm/include/asm/arch-mx35/mx35_pins.h |    2 --
 arch/arm/include/asm/arch-mx5/mx5x_pins.h  |    2 --
 arch/arm/include/asm/arch-mx6/imx-regs.h   |    2 --
 3 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/include/asm/arch-mx35/mx35_pins.h +0 -2
index 3676e33..8c38139 100644
@@ -84,8 +84,6 @@
 					GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
 					((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
 #define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
-#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
-#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
 
 #define NON_GPIO_I	0x7
 #define PIN_TO_MUX_MASK	((1<<(PAD_I - MUX_I)) - 1)
arch/arm/include/asm/arch-mx5/mx5x_pins.h +0 -2
index 4e3a31b..122fbee 100644
@@ -78,8 +78,6 @@
 					GPIO_NUM_PIN) + ((pin >> MUX_IO_I) &\
 					((1 << (MUX_IO_P - MUX_IO_I)) - 1)))
 #define IOMUX_TO_IRQ(pin)       (MXC_GPIO_INT_BASE + IOMUX_TO_GPIO(pin))
-#define GPIO_TO_PORT(n)         (n / GPIO_NUM_PIN)
-#define GPIO_TO_INDEX(n)        (n % GPIO_NUM_PIN)
 
 #define NON_GPIO_PORT		0x7
 #define PIN_TO_MUX_MASK		((1 << (PAD_I - MUX_I)) - 1)
arch/arm/include/asm/arch-mx6/imx-regs.h +0 -0
index cad957a..27ecb75 100644

arch/arm/include/asm/arch-mx6/imx-regs.h line 173

Quoted 8 lines
arch/arm/include/asm/arch-mx6/imx-regs.h +0 -2
@@ -168,8 +168,6 @@
 #define FEC_QUIRK_ENET_MAC
 
 #define GPIO_NUMBER(port, index)		((((port)-1)*32)+((index)&31))
-#define GPIO_TO_PORT(number)		(((number)/32)+1)
-#define GPIO_TO_INDEX(number)		((number)&31)
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>

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
=====================================================================
#2 lore raw

PATCH v2 1/4 imx: Remove unneeded/repititive definitions from imx headers

In reply to Vikram Narayanan
Quoted 4 lines · Vikram Narayanan

Remove gpio related unused/repititive definitions from imx headers.

---

Applied to u-boot-imx (fix), thanks.

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
=====================================================================