]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/gpio/kw_gpio.c
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 8
[karo-tx-uboot.git] / drivers / gpio / kw_gpio.c
index 1c2883479cce6589c152e88f8baa7b28bbddd177..43b27e3fea1bc86f5fbef46f969a7f8ff0322286 100644 (file)
@@ -3,9 +3,7 @@
  *
  * Marvell Orion SoC GPIO handling.
  *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -17,7 +15,8 @@
 
 #include <common.h>
 #include <asm/bitops.h>
-#include <asm/arch/kirkwood.h>
+#include <asm/io.h>
+#include <asm/arch/soc.h>
 #include <asm/arch/gpio.h>
 
 static unsigned long gpio_valid_input[BITS_TO_LONGS(GPIO_MAX)];
@@ -37,7 +36,7 @@ void __set_direction(unsigned pin, int input)
        u = readl(GPIO_IO_CONF(pin));
 }
 
-void __set_level(unsigned pin, int high)
+static void __set_level(unsigned pin, int high)
 {
        u32 u;
 
@@ -49,7 +48,7 @@ void __set_level(unsigned pin, int high)
        writel(u, GPIO_OUT(pin));
 }
 
-void __set_blinking(unsigned pin, int blink)
+static void __set_blinking(unsigned pin, int blink)
 {
        u32 u;
 
@@ -95,7 +94,7 @@ void kw_gpio_set_valid(unsigned pin, int mode)
  */
 int kw_gpio_direction_input(unsigned pin)
 {
-       if (!kw_gpio_is_valid(pin, GPIO_INPUT_OK))
+       if (kw_gpio_is_valid(pin, GPIO_INPUT_OK) != 0)
                return 1;
 
        /* Configure GPIO direction. */