gpio: mpc8xxx: Rename Kconfig option, structures, and functions
[oweals/u-boot.git] / arch / powerpc / include / asm / mpc85xx_gpio.h
index 3d1188467c209a9ce3c98a7405b374e52cfb48e5..1d0dad4ccbf78acb2c212dac7295806b34290259 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;
@@ -72,9 +72,10 @@ static inline int gpio_request(unsigned gpio, const char *label)
        return 0;
 }
 
-static inline void gpio_free(unsigned gpio)
+static inline int gpio_free(unsigned gpio)
 {
        /* Compatibility shim */
+       return 0;
 }
 
 static inline int gpio_direction_input(unsigned gpio)
@@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio)
        return !!mpc85xx_gpio_get(1U << gpio);
 }
 
-static inline void gpio_set_value(unsigned gpio, int value)
+static inline int gpio_set_value(unsigned gpio, int value)
 {
        if (value)
                mpc85xx_gpio_set_high(1U << gpio);
        else
                mpc85xx_gpio_set_low(1U << gpio);
+       return 0;
 }
 
 static inline int gpio_is_valid(int gpio)