diff options
author | Tang Yuantian <yuantian.tang@freescale.com> | 2013-10-17 10:47:33 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-11-25 11:40:05 -0800 |
commit | f40fcfd9111878ba9dbe6cc6b726687bf2adf414 (patch) | |
tree | b3a1df2df2e8705548fadf077773cef607394487 | |
parent | 15d89961a0b9b4554e479125c007ed206390b446 (diff) | |
download | u-boot-imx-f40fcfd9111878ba9dbe6cc6b726687bf2adf414.zip u-boot-imx-f40fcfd9111878ba9dbe6cc6b726687bf2adf414.tar.gz u-boot-imx-f40fcfd9111878ba9dbe6cc6b726687bf2adf414.tar.bz2 |
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: Tang Yuantian <Yuantian.Tang@freescale.com>
-rw-r--r-- | arch/powerpc/include/asm/mpc85xx_gpio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h index 3d11884..87bb4a0 100644 --- a/arch/powerpc/include/asm/mpc85xx_gpio.h +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h @@ -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; |