+// 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.
*/
/*
*/
#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)];
u = readl(GPIO_IO_CONF(pin));
}
-void __set_level(unsigned pin, int high)
+static void __set_level(unsigned pin, int high)
{
u32 u;
writel(u, GPIO_OUT(pin));
}
-void __set_blinking(unsigned pin, int blink)
+static void __set_blinking(unsigned pin, int blink)
{
u32 u;
*/
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. */