]> git.sur5r.net Git - u-boot/blobdiff - drivers/gpio/kw_gpio.c
x86: gpio: Add additional GPIO banks to the ICH6 driver
[u-boot] / drivers / gpio / kw_gpio.c
index 1c2883479cce6589c152e88f8baa7b28bbddd177..51a826de3b9a161bef34d4a4f81b278c4bd7e936 100644 (file)
@@ -3,9 +3,23 @@
  *
  * 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.
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
  */
 
 /*
@@ -17,6 +31,7 @@
 
 #include <common.h>
 #include <asm/bitops.h>
+#include <asm/io.h>
 #include <asm/arch/kirkwood.h>
 #include <asm/arch/gpio.h>
 
@@ -95,7 +110,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. */