]> git.sur5r.net Git - u-boot/blobdiff - drivers/gpio/s5p_gpio.c
drivers: move some drivers to drivers/Makefile
[u-boot] / drivers / gpio / s5p_gpio.c
index 656bf4a06c22072f2c228cb69cf174ee7b089b3b..7eeb96d19ff0daad96bfd4ff546bd090048ff73a 100644 (file)
@@ -2,20 +2,7 @@
  * (C) Copyright 2009 Samsung Electronics
  * Minkyu Kang <mk7.kang@samsung.com>
  *
- * 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+
  */
 
 #include <common.h>
@@ -48,15 +35,8 @@ void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg)
 
 void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en)
 {
-       unsigned int value;
-
        s5p_gpio_cfg_pin(bank, gpio, GPIO_OUTPUT);
-
-       value = readl(&bank->dat);
-       value &= ~DAT_MASK(gpio);
-       if (en)
-               value |= DAT_SET(gpio);
-       writel(value, &bank->dat);
+       s5p_gpio_set_value(bank, gpio, en);
 }
 
 void s5p_gpio_direction_input(struct s5p_gpio_bank *bank, int gpio)