]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/tegra-common/board.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / arm / cpu / tegra-common / board.c
index 1ec6c0677d561088b716df275b1121abb9c24af9..6a6faf4b2760ed96452cd5d251b0536818629d19 100644 (file)
@@ -1,24 +1,8 @@
 /*
- *  (C) Copyright 2010,2011
+ *  (C) Copyright 2010-2014
  *  NVIDIA Corporation <www.nvidia.com>
  *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -37,8 +21,10 @@ enum {
        /* UARTs which we can enable */
        UARTA   = 1 << 0,
        UARTB   = 1 << 1,
+       UARTC   = 1 << 2,
        UARTD   = 1 << 3,
-       UART_COUNT = 4,
+       UARTE   = 1 << 4,
+       UART_COUNT = 5,
 };
 
 /*
@@ -68,7 +54,7 @@ unsigned int query_sdram_size(void)
        case 3:
                return 0x40000000;      /* 1GB */
        }
-#else  /* Tegra30 */
+#else  /* Tegra30/Tegra114 */
        /* bits 31:28 in OdmData are used for RAM size on T30  */
        switch ((reg) >> 28) {
        case 0:
@@ -112,17 +98,29 @@ static int uart_configs[] = {
        FUNCMUX_UART1_SDIO1,
  #else
        FUNCMUX_UART1_IRRX_IRTX,
- #endif
-       FUNCMUX_UART2_UARTB,
+#endif
+       FUNCMUX_UART2_UAD,
        -1,
        FUNCMUX_UART4_GMC,
        -1,
-#else  /* Tegra30 */
+#elif defined(CONFIG_TEGRA30)
        FUNCMUX_UART1_ULPI,     /* UARTA */
        -1,
        -1,
        -1,
        -1,
+#elif defined(CONFIG_TEGRA114)
+       -1,
+       -1,
+       -1,
+       FUNCMUX_UART4_GMI,      /* UARTD */
+       -1,
+#else  /* Tegra124 */
+       FUNCMUX_UART1_KBC,      /* UARTA */
+       -1,
+       -1,
+       FUNCMUX_UART4_GPIO,     /* UARTD */
+       -1,
 #endif
 };
 
@@ -138,6 +136,7 @@ static void setup_uarts(int uart_ids)
                PERIPH_ID_UART2,
                PERIPH_ID_UART3,
                PERIPH_ID_UART4,
+               PERIPH_ID_UART5,
        };
        size_t i;
 
@@ -161,8 +160,14 @@ void board_init_uart_f(void)
 #ifdef CONFIG_TEGRA_ENABLE_UARTB
        uart_ids |= UARTB;
 #endif
+#ifdef CONFIG_TEGRA_ENABLE_UARTC
+       uart_ids |= UARTC;
+#endif
 #ifdef CONFIG_TEGRA_ENABLE_UARTD
        uart_ids |= UARTD;
+#endif
+#ifdef CONFIG_TEGRA_ENABLE_UARTE
+       uart_ids |= UARTE;
 #endif
        setup_uarts(uart_ids);
 }