Skip to contentSkip to conversation

mpc85xx: Fix the offset of register address error

PATCH New Yuantian.Tang at freescale.com 2 participants 2 messages Oct 17, 2013 – Nov 25, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mpc85xx: Fix the offset of register address error

From: Tang Yuantian <[email protected]>

The offset of register address within GPIO module is just CONFIG_SYS_MPC85xx_GPIO_ADDR. So, fix it. The following platforms are confirmed: MPC8572, P1023, P1020, P1022, P2020, P4080, P5020, P5040, T4240, B4860.

---
v2:
- updated the commit message.

 arch/powerpc/include/asm/mpc85xx_gpio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/mpc85xx_gpio.h +2 -2
index 3d11884..87bb4a0 100644
@@ -20,7 +20,7 @@
 static inline void mpc85xx_gpio_set(unsigned int mask,
 		unsigned int dir, unsigned int val)
 {
-	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
+	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
 
 	/* First mask off the unwanted parts of "dir" and "val" */
 	dir &= mask;
@@ -56,7 +56,7 @@ static inline void mpc85xx_gpio_set_high(unsigned int gpios)
 
 static inline unsigned int mpc85xx_gpio_get(unsigned int mask)
 {
-	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
+	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
 
 	/* Read the requested values */
 	return in_be32(&gpio->gpdat) & mask;
Signature · 1 line
1.8.0
#1 lore raw

PATCH v2 1/1 mpc85xx: Fix the offset of register address error

Quoted 9 lines · Yuantian.Tang at freescale.com

From: Tang Yuantian <[email protected]>

The offset of register address within GPIO module is just CONFIG_SYS_MPC85xx_GPIO_ADDR. So, fix it. The following platforms are confirmed: MPC8572, P1023, P1020, P1022, P2020, P4080, P5020, P5040, T4240, B4860.

---

Applied to u-boot-mpc85xx/master. Thanks.

York