Skip to content
Snippets Groups Projects
Commit f40fcfd9 authored by Tang Yuantian's avatar Tang Yuantian Committed by York Sun
Browse files

mpc85xx: Fix the offset of register address error


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.

Signed-off-by: default avatarTang Yuantian <Yuantian.Tang@freescale.com>
parent 15d89961
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
static inline void mpc85xx_gpio_set(unsigned int mask, static inline void mpc85xx_gpio_set(unsigned int mask,
unsigned int dir, unsigned int val) 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" */ /* First mask off the unwanted parts of "dir" and "val" */
dir &= mask; dir &= mask;
...@@ -56,7 +56,7 @@ static inline void mpc85xx_gpio_set_high(unsigned int gpios) ...@@ -56,7 +56,7 @@ static inline void mpc85xx_gpio_set_high(unsigned int gpios)
static inline unsigned int mpc85xx_gpio_get(unsigned int mask) 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 */ /* Read the requested values */
return in_be32(&gpio->gpdat) & mask; return in_be32(&gpio->gpdat) & mask;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment