]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mpc85xx: Fix the offset of register address error
authorTang Yuantian <yuantian.tang@freescale.com>
Thu, 17 Oct 2013 02:47:33 +0000 (10:47 +0800)
committerYork Sun <yorksun@freescale.com>
Mon, 25 Nov 2013 19:40:05 +0000 (11:40 -0800)
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>
arch/powerpc/include/asm/mpc85xx_gpio.h

index 3d1188467c209a9ce3c98a7405b374e52cfb48e5..87bb4a092b86cabd7e6f1550bc4401514dde29f8 100644 (file)
@@ -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;