nand: Update SPL MXS NAND mini driver
[oweals/u-boot.git] / drivers / gpio / kw_gpio.c
index 1c2883479cce6589c152e88f8baa7b28bbddd177..a15769793f175a77bc12e254c13008f1bf08ad22 100644 (file)
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * arch/arm/plat-orion/gpio.c
  *
  * 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.
  */
 
 /*
@@ -16,8 +13,9 @@
  */
 
 #include <common.h>
-#include <asm/bitops.h>
-#include <asm/arch/kirkwood.h>
+#include <linux/bitops.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 +35,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 +47,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 +93,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. */