]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/gpio/da8xx_gpio.c
net: macb: add gmac multi-queue support
[karo-tx-uboot.git] / drivers / gpio / da8xx_gpio.c
index 271b8d93f4352b1471e938169e00940ef84884c1..fa3a3946fc1f1d3356e3b48b5aa0ae9248bdc5dd 100644 (file)
@@ -4,20 +4,7 @@
  * (C) Copyright 2011 Guralp Systems Ltd.
  * Laurence Withers <lwithers@guralp.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>
@@ -31,6 +18,7 @@ static struct gpio_registry {
        char name[GPIO_NAME_SIZE];
 } gpio_registry[MAX_NUM_GPIOS];
 
+#if defined(CONFIG_SOC_DA8XX)
 #define pinmux(x)       (&davinci_syscfg_regs->pinmux[x])
 
 #if defined(CONFIG_SOC_DA8XX) && !defined(CONFIG_SOC_DA850)
@@ -164,7 +152,7 @@ static const struct pinmux_config gpio_pinmux[] = {
        { pinmux(0), 1, 0 },
        { pinmux(0), 1, 1 },
 };
-#else
+#else /* CONFIG_SOC_DA8XX && CONFIG_SOC_DA850 */
 static const struct pinmux_config gpio_pinmux[] = {
        { pinmux(1), 8, 7 },    /* GP0[0] */
        { pinmux(1), 8, 6 },
@@ -311,7 +299,10 @@ static const struct pinmux_config gpio_pinmux[] = {
        { pinmux(18), 8, 3 },
        { pinmux(18), 8, 2 },
 };
-#endif
+#endif /* CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850 */
+#else /* !CONFIG_SOC_DA8XX */
+#define davinci_configure_pin_mux(a, b)
+#endif /* CONFIG_SOC_DA8XX */
 
 int gpio_request(unsigned gpio, const char *label)
 {