]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/include/asm/mpc85xx_gpio.h
Add more SPDX-License-Identifier tags
[u-boot] / arch / powerpc / include / asm / mpc85xx_gpio.h
index 2aed5148ef5407f2bed158e053af397731ef23ad..1d0dad4ccbf78acb2c212dac7295806b34290259 100644 (file)
@@ -1,20 +1,7 @@
 /*
  * Copyright 2010 eXMeritus, A Boeing Company
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef POWERPC_ASM_MPC85XX_GPIO_H_
@@ -33,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;
@@ -69,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;
@@ -85,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)
@@ -110,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)