[U-Boot] [PATCH 56/60] ARM: tegra: remove funcmux API
Stephen Warren
swarren at wwwdotorg.org
Tue Apr 19 22:59:36 CEST 2016
From: Stephen Warren <swarren at nvidia.com>
Replace all usage of funcmux APIs with the pinmux functions previously
added to replace then. Delete the funcmux implementation since it's no
longer used. This merges all pinmux-related logic into the pinmux code
and avoids use of the funcmux "IOCTL" functions, which compile in
support for all possible pinmux options even when they won't ever be
used by a particular build.
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
arch/arm/include/asm/arch-tegra/funcmux.h | 29 ---
arch/arm/include/asm/arch-tegra114/funcmux.h | 21 --
arch/arm/include/asm/arch-tegra124/funcmux.h | 23 ---
arch/arm/include/asm/arch-tegra20/funcmux.h | 52 -----
arch/arm/include/asm/arch-tegra210/funcmux.h | 23 ---
arch/arm/include/asm/arch-tegra30/funcmux.h | 21 --
arch/arm/mach-tegra/board.c | 1 -
arch/arm/mach-tegra/board2.c | 1 -
arch/arm/mach-tegra/tegra114/Makefile | 2 +-
arch/arm/mach-tegra/tegra114/funcmux.c | 57 -----
arch/arm/mach-tegra/tegra124/Makefile | 1 -
arch/arm/mach-tegra/tegra124/funcmux.c | 71 -------
arch/arm/mach-tegra/tegra20/Makefile | 2 +-
arch/arm/mach-tegra/tegra20/funcmux.c | 299 ---------------------------
arch/arm/mach-tegra/tegra210/Makefile | 1 -
arch/arm/mach-tegra/tegra210/funcmux.c | 39 ----
arch/arm/mach-tegra/tegra30/Makefile | 2 +-
arch/arm/mach-tegra/tegra30/funcmux.c | 51 -----
board/avionic-design/common/tamonten.c | 11 +-
board/compal/paz00/paz00.c | 4 +-
board/compulab/trimslice/trimslice.c | 5 +-
board/nvidia/harmony/harmony.c | 11 +-
board/nvidia/seaboard/seaboard.c | 17 +-
board/nvidia/whistler/whistler.c | 7 +-
board/toradex/colibri_t20/colibri_t20.c | 14 +-
drivers/mtd/nand/tegra_nand.c | 3 +-
26 files changed, 34 insertions(+), 734 deletions(-)
delete mode 100644 arch/arm/include/asm/arch-tegra/funcmux.h
delete mode 100644 arch/arm/include/asm/arch-tegra114/funcmux.h
delete mode 100644 arch/arm/include/asm/arch-tegra124/funcmux.h
delete mode 100644 arch/arm/include/asm/arch-tegra20/funcmux.h
delete mode 100644 arch/arm/include/asm/arch-tegra210/funcmux.h
delete mode 100644 arch/arm/include/asm/arch-tegra30/funcmux.h
delete mode 100644 arch/arm/mach-tegra/tegra114/funcmux.c
delete mode 100644 arch/arm/mach-tegra/tegra124/funcmux.c
delete mode 100644 arch/arm/mach-tegra/tegra20/funcmux.c
delete mode 100644 arch/arm/mach-tegra/tegra210/funcmux.c
delete mode 100644 arch/arm/mach-tegra/tegra30/funcmux.c
diff --git a/arch/arm/include/asm/arch-tegra/funcmux.h b/arch/arm/include/asm/arch-tegra/funcmux.h
deleted file mode 100644
index d9bcf605c784..000000000000
--- a/arch/arm/include/asm/arch-tegra/funcmux.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-/* Tegra high-level function multiplexing */
-
-#ifndef _TEGRA_FUNCMUX_H_
-#define _TEGRA_FUNCMUX_H_
-
-/**
- * Select a config for a particular peripheral.
- *
- * Each peripheral can operate through a number of configurations,
- * which are sets of pins that it uses to bring out its signals.
- * The basic config is 0, and higher numbers indicate different
- * pinmux settings to bring the peripheral out on other pins,
- *
- * This function also disables tristate for the function's pins,
- * so that they operate in normal mode.
- *
- * @param id Peripheral id
- * @param config Configuration to use (FUNCMUX_...), 0 for default
- * @return 0 if ok, -1 on error (e.g. incorrect id or config)
- */
-int funcmux_select(enum periph_id id, int config);
-
-#endif /* _TEGRA_FUNCMUX_H_ */
diff --git a/arch/arm/include/asm/arch-tegra114/funcmux.h b/arch/arm/include/asm/arch-tegra114/funcmux.h
deleted file mode 100644
index 9c62cc39d5e0..000000000000
--- a/arch/arm/include/asm/arch-tegra114/funcmux.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-/* Tegra114 high-level function multiplexing */
-
-#ifndef _TEGRA114_FUNCMUX_H_
-#define _TEGRA114_FUNCMUX_H_
-
-#include <asm/arch-tegra/funcmux.h>
-
-/* Configs supported by the func mux */
-enum {
- FUNCMUX_DEFAULT = 0, /* default config */
-
- /* UART configs */
- FUNCMUX_UART4_GMI = 0,
-};
-#endif /* _TEGRA114_FUNCMUX_H_ */
diff --git a/arch/arm/include/asm/arch-tegra124/funcmux.h b/arch/arm/include/asm/arch-tegra124/funcmux.h
deleted file mode 100644
index df94d135f86d..000000000000
--- a/arch/arm/include/asm/arch-tegra124/funcmux.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * (C) Copyright 2013
- * NVIDIA Corporation <www.nvidia.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra124 high-level function multiplexing */
-
-#ifndef _TEGRA124_FUNCMUX_H_
-#define _TEGRA124_FUNCMUX_H_
-
-#include <asm/arch-tegra/funcmux.h>
-
-/* Configs supported by the func mux */
-enum {
- FUNCMUX_DEFAULT = 0, /* default config */
-
- /* UART configs */
- FUNCMUX_UART1_KBC = 0,
- FUNCMUX_UART4_GPIO = 0,
-};
-#endif /* _TEGRA124_FUNCMUX_H_ */
diff --git a/arch/arm/include/asm/arch-tegra20/funcmux.h b/arch/arm/include/asm/arch-tegra20/funcmux.h
deleted file mode 100644
index 39c2c9d825a0..000000000000
--- a/arch/arm/include/asm/arch-tegra20/funcmux.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra20 high-level function multiplexing */
-
-#ifndef _TEGRA20_FUNCMUX_H_
-#define _TEGRA20_FUNCMUX_H_
-
-#include <asm/arch-tegra/funcmux.h>
-
-/* Configs supported by the func mux */
-enum {
- FUNCMUX_DEFAULT = 0, /* default config */
-
- /* UART configs */
- FUNCMUX_UART1_IRRX_IRTX = 0,
- FUNCMUX_UART1_UAA_UAB,
- FUNCMUX_UART1_GPU,
- FUNCMUX_UART1_SDIO1,
- FUNCMUX_UART2_UAD = 0,
- FUNCMUX_UART4_GMC = 0,
-
- /* I2C configs */
- FUNCMUX_DVC_I2CP = 0,
- FUNCMUX_I2C1_RM = 0,
- FUNCMUX_I2C2_DDC = 0,
- FUNCMUX_I2C2_PTA,
- FUNCMUX_I2C3_DTF = 0,
-
- /* SDMMC configs */
- FUNCMUX_SDMMC1_SDIO1_4BIT = 0,
- FUNCMUX_SDMMC2_DTA_DTD_8BIT = 0,
- FUNCMUX_SDMMC3_SDB_4BIT = 0,
- FUNCMUX_SDMMC3_SDB_SLXA_8BIT,
- FUNCMUX_SDMMC4_ATC_ATD_8BIT = 0,
- FUNCMUX_SDMMC4_ATB_GMA_4_BIT,
- FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT,
-
- /* USB configs */
- FUNCMUX_USB2_ULPI = 0,
-
- /* Serial Flash configs */
- FUNCMUX_SPI1_GMC_GMD = 0,
-
- /* NAND flags */
- FUNCMUX_NDFLASH_ATC = 0,
- FUNCMUX_NDFLASH_KBC_8_BIT,
-};
-#endif /* _TEGRA20_FUNCMUX_H_ */
diff --git a/arch/arm/include/asm/arch-tegra210/funcmux.h b/arch/arm/include/asm/arch-tegra210/funcmux.h
deleted file mode 100644
index f0851de122db..000000000000
--- a/arch/arm/include/asm/arch-tegra210/funcmux.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * (C) Copyright 2013-2015
- * NVIDIA Corporation <www.nvidia.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra210 high-level function multiplexing */
-
-#ifndef _TEGRA210_FUNCMUX_H_
-#define _TEGRA210_FUNCMUX_H_
-
-#include <asm/arch-tegra/funcmux.h>
-
-/* Configs supported by the func mux */
-enum {
- FUNCMUX_DEFAULT = 0, /* default config */
-
- /* UART configs */
- FUNCMUX_UART1_UART1 = 0,
- FUNCMUX_UART4_UART4 = 0,
-};
-#endif /* _TEGRA210_FUNCMUX_H_ */
diff --git a/arch/arm/include/asm/arch-tegra30/funcmux.h b/arch/arm/include/asm/arch-tegra30/funcmux.h
deleted file mode 100644
index ae6236273fd4..000000000000
--- a/arch/arm/include/asm/arch-tegra30/funcmux.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-/* Tegra30 high-level function multiplexing */
-
-#ifndef _TEGRA30_FUNCMUX_H_
-#define _TEGRA30_FUNCMUX_H_
-
-#include <asm/arch-tegra/funcmux.h>
-
-/* Configs supported by the func mux */
-enum {
- FUNCMUX_DEFAULT = 0, /* default config */
-
- /* UART configs */
- FUNCMUX_UART1_ULPI = 0,
-};
-#endif /* _TEGRA30_FUNCMUX_H_ */
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index a5ee5a3572b1..1e7059798dcb 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -9,7 +9,6 @@
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch/tegra.h>
#include <mach/board.h>
#include <soc/mc.h>
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index d9dfb01fdcfc..85de903559c6 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -9,7 +9,6 @@
#include <errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include "../../../drivers/usb/host/ehci-tegra-priv.h"
diff --git a/arch/arm/mach-tegra/tegra114/Makefile b/arch/arm/mach-tegra/tegra114/Makefile
index fd56b6a02f6e..2e02ae41ea4d 100644
--- a/arch/arm/mach-tegra/tegra114/Makefile
+++ b/arch/arm/mach-tegra/tegra114/Makefile
@@ -6,5 +6,5 @@
obj-$(CONFIG_SPL_BUILD) += cpu.o
-obj-y += clock.o funcmux.o pinmux.o
+obj-y += clock.o pinmux.o
obj-y += pllx.o
diff --git a/arch/arm/mach-tegra/tegra114/funcmux.c b/arch/arm/mach-tegra/tegra114/funcmux.c
deleted file mode 100644
index e32b75c8a0b6..000000000000
--- a/arch/arm/mach-tegra/tegra114/funcmux.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-/* Tegra114 high-level function multiplexing */
-
-#include <common.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
-#include <mach/pinmux.h>
-
-int funcmux_select(enum periph_id id, int config)
-{
- int bad_config = config != FUNCMUX_DEFAULT;
-
- switch (id) {
- case PERIPH_ID_UART4:
- switch (config) {
- case FUNCMUX_UART4_GMI:
- pinmux_set_func(PMUX_PINGRP_GMI_A16_PJ7,
- PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_GMI_A17_PB0,
- PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_GMI_A18_PB1,
- PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_GMI_A19_PK7,
- PMUX_FUNC_UARTD);
-
- pinmux_set_io(PMUX_PINGRP_GMI_A16_PJ7, PMUX_PIN_OUTPUT);
- pinmux_set_io(PMUX_PINGRP_GMI_A17_PB0, PMUX_PIN_INPUT);
- pinmux_set_io(PMUX_PINGRP_GMI_A18_PB1, PMUX_PIN_INPUT);
- pinmux_set_io(PMUX_PINGRP_GMI_A19_PK7, PMUX_PIN_OUTPUT);
-
- pinmux_tristate_disable(PMUX_PINGRP_GMI_A16_PJ7);
- pinmux_tristate_disable(PMUX_PINGRP_GMI_A17_PB0);
- pinmux_tristate_disable(PMUX_PINGRP_GMI_A18_PB1);
- pinmux_tristate_disable(PMUX_PINGRP_GMI_A19_PK7);
- break;
- }
- break;
-
- /* Add other periph IDs here as needed */
-
- default:
- debug("%s: invalid periph_id %d", __func__, id);
- return -1;
- }
-
- if (bad_config) {
- debug("%s: invalid config %d for periph_id %d", __func__,
- config, id);
- return -1;
- }
- return 0;
-}
diff --git a/arch/arm/mach-tegra/tegra124/Makefile b/arch/arm/mach-tegra/tegra124/Makefile
index e9554ccc966a..1050774a2f92 100644
--- a/arch/arm/mach-tegra/tegra124/Makefile
+++ b/arch/arm/mach-tegra/tegra124/Makefile
@@ -8,7 +8,6 @@
obj-$(CONFIG_SPL_BUILD) += cpu.o
obj-y += clock.o
-obj-y += funcmux.o
obj-y += pinmux.o
obj-y += pllx.o
obj-y += xusb-padctl.o
diff --git a/arch/arm/mach-tegra/tegra124/funcmux.c b/arch/arm/mach-tegra/tegra124/funcmux.c
deleted file mode 100644
index cdbe73f319a6..000000000000
--- a/arch/arm/mach-tegra/tegra124/funcmux.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * (C) Copyright 2013-2016
- * NVIDIA Corporation <www.nvidia.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra124 high-level function multiplexing */
-
-#include <common.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
-#include <mach/pinmux.h>
-
-int funcmux_select(enum periph_id id, int config)
-{
- int bad_config = config != FUNCMUX_DEFAULT;
-
- switch (id) {
- case PERIPH_ID_UART4:
- switch (config) {
- case FUNCMUX_UART4_GPIO: /* TXD,RXD,CTS,RTS */
- pinmux_set_func(PMUX_PINGRP_PJ7, PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_PB0, PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_PB1, PMUX_FUNC_UARTD);
- pinmux_set_func(PMUX_PINGRP_PK7, PMUX_FUNC_UARTD);
-
- pinmux_set_io(PMUX_PINGRP_PJ7, PMUX_PIN_OUTPUT);
- pinmux_set_io(PMUX_PINGRP_PB0, PMUX_PIN_INPUT);
- pinmux_set_io(PMUX_PINGRP_PB1, PMUX_PIN_INPUT);
- pinmux_set_io(PMUX_PINGRP_PK7, PMUX_PIN_OUTPUT);
-
- pinmux_tristate_disable(PMUX_PINGRP_PJ7);
- pinmux_tristate_disable(PMUX_PINGRP_PB0);
- pinmux_tristate_disable(PMUX_PINGRP_PB1);
- pinmux_tristate_disable(PMUX_PINGRP_PK7);
- break;
- }
- break;
-
- case PERIPH_ID_UART1:
- switch (config) {
- case FUNCMUX_UART1_KBC:
- pinmux_set_func(PMUX_PINGRP_KB_ROW9_PS1,
- PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_KB_ROW10_PS2,
- PMUX_FUNC_UARTA);
-
- pinmux_set_io(PMUX_PINGRP_KB_ROW9_PS1, PMUX_PIN_OUTPUT);
- pinmux_set_io(PMUX_PINGRP_KB_ROW10_PS2, PMUX_PIN_INPUT);
-
- pinmux_tristate_disable(PMUX_PINGRP_KB_ROW9_PS1);
- pinmux_tristate_disable(PMUX_PINGRP_KB_ROW10_PS2);
- break;
- }
- break;
-
- /* Add other periph IDs here as needed */
-
- default:
- debug("%s: invalid periph_id %d", __func__, id);
- return -1;
- }
-
- if (bad_config) {
- debug("%s: invalid config %d for periph_id %d", __func__,
- config, id);
- return -1;
- }
- return 0;
-}
diff --git a/arch/arm/mach-tegra/tegra20/Makefile b/arch/arm/mach-tegra/tegra20/Makefile
index 105f6ffa820c..768fa38aa21f 100644
--- a/arch/arm/mach-tegra/tegra20/Makefile
+++ b/arch/arm/mach-tegra/tegra20/Makefile
@@ -12,7 +12,7 @@ endif
# flags for any startup files it might use.
CFLAGS_warmboot_avp.o += -march=armv4t
-obj-y += clock.o funcmux.o pinmux.o
+obj-y += clock.o pinmux.o
obj-y += pllx.o
obj-y += sku.o
obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o
diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
deleted file mode 100644
index 348507aee2d6..000000000000
--- a/arch/arm/mach-tegra/tegra20/funcmux.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra20 high-level function multiplexing */
-#include <common.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
-#include <mach/pinmux.h>
-
-/*
- * The PINMUX macro is used to set up pinmux tables.
- */
-#define PINMUX(grp, mux, pupd, tri) \
- {PMUX_PINGRP_##grp, PMUX_FUNC_##mux, PMUX_PULL_##pupd, PMUX_TRI_##tri}
-
-static const struct pmux_pingrp_config disp1_default[] = {
- PINMUX(LDI, DISPA, NORMAL, NORMAL),
- PINMUX(LHP0, DISPA, NORMAL, NORMAL),
- PINMUX(LHP1, DISPA, NORMAL, NORMAL),
- PINMUX(LHP2, DISPA, NORMAL, NORMAL),
- PINMUX(LHS, DISPA, NORMAL, NORMAL),
- PINMUX(LM0, RSVD4, NORMAL, NORMAL),
- PINMUX(LPP, DISPA, NORMAL, NORMAL),
- PINMUX(LPW0, DISPA, NORMAL, NORMAL),
- PINMUX(LPW2, DISPA, NORMAL, NORMAL),
- PINMUX(LSC0, DISPA, NORMAL, NORMAL),
- PINMUX(LSPI, DISPA, NORMAL, NORMAL),
- PINMUX(LVP1, DISPA, NORMAL, NORMAL),
- PINMUX(LVS, DISPA, NORMAL, NORMAL),
- PINMUX(SLXD, SPDIF, NORMAL, NORMAL),
-};
-
-
-int funcmux_select(enum periph_id id, int config)
-{
- int bad_config = config != FUNCMUX_DEFAULT;
-
- switch (id) {
- case PERIPH_ID_UART1:
- switch (config) {
- case FUNCMUX_UART1_IRRX_IRTX:
- pinmux_set_func(PMUX_PINGRP_IRRX, PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_IRTX, PMUX_FUNC_UARTA);
- pinmux_tristate_disable(PMUX_PINGRP_IRRX);
- pinmux_tristate_disable(PMUX_PINGRP_IRTX);
- break;
- case FUNCMUX_UART1_UAA_UAB:
- pinmux_set_func(PMUX_PINGRP_UAA, PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_UAB, PMUX_FUNC_UARTA);
- pinmux_tristate_disable(PMUX_PINGRP_UAA);
- pinmux_tristate_disable(PMUX_PINGRP_UAB);
- bad_config = 0;
- break;
- case FUNCMUX_UART1_GPU:
- pinmux_set_func(PMUX_PINGRP_GPU, PMUX_FUNC_UARTA);
- pinmux_tristate_disable(PMUX_PINGRP_GPU);
- bad_config = 0;
- break;
- case FUNCMUX_UART1_SDIO1:
- pinmux_set_func(PMUX_PINGRP_SDIO1, PMUX_FUNC_UARTA);
- pinmux_tristate_disable(PMUX_PINGRP_SDIO1);
- bad_config = 0;
- break;
- }
- if (!bad_config) {
- /*
- * Tegra appears to boot with function UARTA pre-
- * selected on mux group SDB. If two mux groups are
- * both set to the same function, it's unclear which
- * group's pins drive the RX signals into the HW.
- * For UARTA, SDB certainly overrides group IRTX in
- * practice. To solve this, configure some alternative
- * function on SDB to avoid the conflict. Also, tri-
- * state the group to avoid driving any signal onto it
- * until we know what's connected.
- */
- pinmux_tristate_enable(PMUX_PINGRP_SDB);
- pinmux_set_func(PMUX_PINGRP_SDB, PMUX_FUNC_SDIO3);
- }
- break;
-
- case PERIPH_ID_UART2:
- if (config == FUNCMUX_UART2_UAD) {
- pinmux_set_func(PMUX_PINGRP_UAD, PMUX_FUNC_UARTB);
- pinmux_tristate_disable(PMUX_PINGRP_UAD);
- }
- break;
-
- case PERIPH_ID_UART4:
- if (config == FUNCMUX_UART4_GMC) {
- pinmux_set_func(PMUX_PINGRP_GMC, PMUX_FUNC_UARTD);
- pinmux_tristate_disable(PMUX_PINGRP_GMC);
- }
- break;
-
- case PERIPH_ID_DVC_I2C:
- /* there is only one selection, pinmux_config is ignored */
- if (config == FUNCMUX_DVC_I2CP) {
- pinmux_set_func(PMUX_PINGRP_I2CP, PMUX_FUNC_I2C);
- pinmux_tristate_disable(PMUX_PINGRP_I2CP);
- }
- break;
-
- case PERIPH_ID_I2C1:
- /* support pinmux_config of 0 for now, */
- if (config == FUNCMUX_I2C1_RM) {
- pinmux_set_func(PMUX_PINGRP_RM, PMUX_FUNC_I2C);
- pinmux_tristate_disable(PMUX_PINGRP_RM);
- }
- break;
- case PERIPH_ID_I2C2: /* I2C2 */
- switch (config) {
- case FUNCMUX_I2C2_DDC: /* DDC pin group, select I2C2 */
- pinmux_set_func(PMUX_PINGRP_DDC, PMUX_FUNC_I2C2);
- /* PTA to HDMI */
- pinmux_set_func(PMUX_PINGRP_PTA, PMUX_FUNC_HDMI);
- pinmux_tristate_disable(PMUX_PINGRP_DDC);
- break;
- case FUNCMUX_I2C2_PTA: /* PTA pin group, select I2C2 */
- pinmux_set_func(PMUX_PINGRP_PTA, PMUX_FUNC_I2C2);
- /* set DDC_SEL to RSVDx (RSVD2 works for now) */
- pinmux_set_func(PMUX_PINGRP_DDC, PMUX_FUNC_RSVD2);
- pinmux_tristate_disable(PMUX_PINGRP_PTA);
- bad_config = 0;
- break;
- }
- break;
- case PERIPH_ID_I2C3: /* I2C3 */
- /* support pinmux_config of 0 for now */
- if (config == FUNCMUX_I2C3_DTF) {
- pinmux_set_func(PMUX_PINGRP_DTF, PMUX_FUNC_I2C3);
- pinmux_tristate_disable(PMUX_PINGRP_DTF);
- }
- break;
-
- case PERIPH_ID_SDMMC1:
- if (config == FUNCMUX_SDMMC1_SDIO1_4BIT) {
- pinmux_set_func(PMUX_PINGRP_SDIO1, PMUX_FUNC_SDIO1);
- pinmux_tristate_disable(PMUX_PINGRP_SDIO1);
- }
- break;
-
- case PERIPH_ID_SDMMC2:
- if (config == FUNCMUX_SDMMC2_DTA_DTD_8BIT) {
- pinmux_set_func(PMUX_PINGRP_DTA, PMUX_FUNC_SDIO2);
- pinmux_set_func(PMUX_PINGRP_DTD, PMUX_FUNC_SDIO2);
-
- pinmux_tristate_disable(PMUX_PINGRP_DTA);
- pinmux_tristate_disable(PMUX_PINGRP_DTD);
- }
- break;
-
- case PERIPH_ID_SDMMC3:
- switch (config) {
- case FUNCMUX_SDMMC3_SDB_SLXA_8BIT:
- pinmux_set_func(PMUX_PINGRP_SLXA, PMUX_FUNC_SDIO3);
- pinmux_set_func(PMUX_PINGRP_SLXC, PMUX_FUNC_SDIO3);
- pinmux_set_func(PMUX_PINGRP_SLXD, PMUX_FUNC_SDIO3);
- pinmux_set_func(PMUX_PINGRP_SLXK, PMUX_FUNC_SDIO3);
-
- pinmux_tristate_disable(PMUX_PINGRP_SLXA);
- pinmux_tristate_disable(PMUX_PINGRP_SLXC);
- pinmux_tristate_disable(PMUX_PINGRP_SLXD);
- pinmux_tristate_disable(PMUX_PINGRP_SLXK);
- /* fall through */
-
- case FUNCMUX_SDMMC3_SDB_4BIT:
- pinmux_set_func(PMUX_PINGRP_SDB, PMUX_FUNC_SDIO3);
- pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_SDIO3);
- pinmux_set_func(PMUX_PINGRP_SDD, PMUX_FUNC_SDIO3);
-
- pinmux_tristate_disable(PMUX_PINGRP_SDB);
- pinmux_tristate_disable(PMUX_PINGRP_SDC);
- pinmux_tristate_disable(PMUX_PINGRP_SDD);
- bad_config = 0;
- break;
- }
- break;
-
- case PERIPH_ID_SDMMC4:
- switch (config) {
- case FUNCMUX_SDMMC4_ATC_ATD_8BIT:
- pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_SDIO4);
- pinmux_set_func(PMUX_PINGRP_ATD, PMUX_FUNC_SDIO4);
-
- pinmux_tristate_disable(PMUX_PINGRP_ATC);
- pinmux_tristate_disable(PMUX_PINGRP_ATD);
- break;
-
- case FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT:
- pinmux_set_func(PMUX_PINGRP_GME, PMUX_FUNC_SDIO4);
- pinmux_tristate_disable(PMUX_PINGRP_GME);
- /* fall through */
-
- case FUNCMUX_SDMMC4_ATB_GMA_4_BIT:
- pinmux_set_func(PMUX_PINGRP_ATB, PMUX_FUNC_SDIO4);
- pinmux_set_func(PMUX_PINGRP_GMA, PMUX_FUNC_SDIO4);
-
- pinmux_tristate_disable(PMUX_PINGRP_ATB);
- pinmux_tristate_disable(PMUX_PINGRP_GMA);
- bad_config = 0;
- break;
- }
- break;
-
- case PERIPH_ID_KBC:
- if (config == FUNCMUX_DEFAULT) {
- enum pmux_pingrp grp[] = {PMUX_PINGRP_KBCA,
- PMUX_PINGRP_KBCB, PMUX_PINGRP_KBCC,
- PMUX_PINGRP_KBCD, PMUX_PINGRP_KBCE,
- PMUX_PINGRP_KBCF};
- int i;
-
- for (i = 0; i < ARRAY_SIZE(grp); i++) {
- pinmux_tristate_disable(grp[i]);
- pinmux_set_func(grp[i], PMUX_FUNC_KBC);
- pinmux_set_pullupdown(grp[i], PMUX_PULL_UP);
- }
- }
- break;
-
- case PERIPH_ID_USB2:
- if (config == FUNCMUX_USB2_ULPI) {
- pinmux_set_func(PMUX_PINGRP_UAA, PMUX_FUNC_ULPI);
- pinmux_set_func(PMUX_PINGRP_UAB, PMUX_FUNC_ULPI);
- pinmux_set_func(PMUX_PINGRP_UDA, PMUX_FUNC_ULPI);
-
- pinmux_tristate_disable(PMUX_PINGRP_UAA);
- pinmux_tristate_disable(PMUX_PINGRP_UAB);
- pinmux_tristate_disable(PMUX_PINGRP_UDA);
- }
- break;
-
- case PERIPH_ID_SPI1:
- if (config == FUNCMUX_SPI1_GMC_GMD) {
- pinmux_set_func(PMUX_PINGRP_GMC, PMUX_FUNC_SFLASH);
- pinmux_set_func(PMUX_PINGRP_GMD, PMUX_FUNC_SFLASH);
-
- pinmux_tristate_disable(PMUX_PINGRP_GMC);
- pinmux_tristate_disable(PMUX_PINGRP_GMD);
- }
- break;
-
- case PERIPH_ID_NDFLASH:
- switch (config) {
- case FUNCMUX_NDFLASH_ATC:
- pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_NAND);
- pinmux_tristate_disable(PMUX_PINGRP_ATC);
- break;
- case FUNCMUX_NDFLASH_KBC_8_BIT:
- pinmux_set_func(PMUX_PINGRP_KBCA, PMUX_FUNC_NAND);
- pinmux_set_func(PMUX_PINGRP_KBCB, PMUX_FUNC_NAND);
- pinmux_set_func(PMUX_PINGRP_KBCC, PMUX_FUNC_NAND);
- pinmux_set_func(PMUX_PINGRP_KBCD, PMUX_FUNC_NAND);
- pinmux_set_func(PMUX_PINGRP_KBCE, PMUX_FUNC_NAND);
- pinmux_set_func(PMUX_PINGRP_KBCF, PMUX_FUNC_NAND);
-
- pinmux_tristate_disable(PMUX_PINGRP_KBCA);
- pinmux_tristate_disable(PMUX_PINGRP_KBCB);
- pinmux_tristate_disable(PMUX_PINGRP_KBCC);
- pinmux_tristate_disable(PMUX_PINGRP_KBCD);
- pinmux_tristate_disable(PMUX_PINGRP_KBCE);
- pinmux_tristate_disable(PMUX_PINGRP_KBCF);
-
- bad_config = 0;
- break;
- }
- break;
- case PERIPH_ID_DISP1:
- if (config == FUNCMUX_DEFAULT) {
- int i;
-
- for (i = PMUX_PINGRP_LD0; i <= PMUX_PINGRP_LD17; i++) {
- pinmux_set_func(i, PMUX_FUNC_DISPA);
- pinmux_tristate_disable(i);
- pinmux_set_pullupdown(i, PMUX_PULL_NORMAL);
- }
- pinmux_config_pingrp_table(disp1_default,
- ARRAY_SIZE(disp1_default));
- }
- break;
-
- default:
- debug("%s: invalid periph_id %d", __func__, id);
- return -1;
- }
-
- if (bad_config) {
- debug("%s: invalid config %d for periph_id %d", __func__,
- config, id);
- return -1;
- }
-
- return 0;
-}
diff --git a/arch/arm/mach-tegra/tegra210/Makefile b/arch/arm/mach-tegra/tegra210/Makefile
index dfc0a9b8e702..ba27794694e4 100644
--- a/arch/arm/mach-tegra/tegra210/Makefile
+++ b/arch/arm/mach-tegra/tegra210/Makefile
@@ -6,7 +6,6 @@
#
obj-y += clock.o
-obj-y += funcmux.o
obj-y += pinmux.o
obj-y += pllx.o
obj-y += xusb-padctl.o
diff --git a/arch/arm/mach-tegra/tegra210/funcmux.c b/arch/arm/mach-tegra/tegra210/funcmux.c
deleted file mode 100644
index bd7c2521caf3..000000000000
--- a/arch/arm/mach-tegra/tegra210/funcmux.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * (C) Copyright 2013-2016
- * NVIDIA Corporation <www.nvidia.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/* Tegra210 high-level function multiplexing */
-
-#include <common.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
-
-int funcmux_select(enum periph_id id, int config)
-{
- int bad_config = config != FUNCMUX_DEFAULT;
-
- switch (id) {
- /*
- * Add other periph IDs here as needed.
- * Note that all pinmux/pads should have already
- * been set up in the board pinmux table in
- * pinmux-config-<board>.h for all periphs.
- * Leave this in for the odd case where a mux
- * needs to be changed on-the-fly.
- */
-
- default:
- debug("%s: invalid periph_id %d", __func__, id);
- return -1;
- }
-
- if (bad_config) {
- debug("%s: invalid config %d for periph_id %d", __func__,
- config, id);
- return -1;
- }
- return 0;
-}
diff --git a/arch/arm/mach-tegra/tegra30/Makefile b/arch/arm/mach-tegra/tegra30/Makefile
index fd56b6a02f6e..2e02ae41ea4d 100644
--- a/arch/arm/mach-tegra/tegra30/Makefile
+++ b/arch/arm/mach-tegra/tegra30/Makefile
@@ -6,5 +6,5 @@
obj-$(CONFIG_SPL_BUILD) += cpu.o
-obj-y += clock.o funcmux.o pinmux.o
+obj-y += clock.o pinmux.o
obj-y += pllx.o
diff --git a/arch/arm/mach-tegra/tegra30/funcmux.c b/arch/arm/mach-tegra/tegra30/funcmux.c
deleted file mode 100644
index c627574d61de..000000000000
--- a/arch/arm/mach-tegra/tegra30/funcmux.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-/* Tegra30 high-level function multiplexing */
-
-#include <common.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
-#include <mach/pinmux.h>
-
-int funcmux_select(enum periph_id id, int config)
-{
- int bad_config = config != FUNCMUX_DEFAULT;
-
- switch (id) {
- case PERIPH_ID_UART1:
- switch (config) {
- case FUNCMUX_UART1_ULPI:
- pinmux_set_func(PMUX_PINGRP_ULPI_DATA0_PO1,
- PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_ULPI_DATA1_PO2,
- PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_ULPI_DATA2_PO3,
- PMUX_FUNC_UARTA);
- pinmux_set_func(PMUX_PINGRP_ULPI_DATA3_PO4,
- PMUX_FUNC_UARTA);
- pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA0_PO1);
- pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA1_PO2);
- pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA2_PO3);
- pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA3_PO4);
- break;
- }
- break;
-
- /* Add other periph IDs here as needed */
-
- default:
- debug("%s: invalid periph_id %d", __func__, id);
- return -1;
- }
-
- if (bad_config) {
- debug("%s: invalid config %d for periph_id %d", __func__,
- config, id);
- return -1;
- }
- return 0;
-}
diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c
index c43a93de1fc6..162683eff9ce 100644
--- a/board/avionic-design/common/tamonten.c
+++ b/board/avionic-design/common/tamonten.c
@@ -13,7 +13,6 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include <mach/board.h>
@@ -32,15 +31,15 @@ void tegra_board_early_init_f(void)
gpio_request(TEGRA_GPIO(I, 4), NULL);
gpio_direction_output(TEGRA_GPIO(I, 4), 1);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
+ tegra20_pinmux_sdmmc4_atb_gma_gme_8bit();
/* for write-protect GPIO PI6 */
pinmux_tristate_disable(PMUX_PINGRP_ATA);
/* for CD GPIO PH2 */
pinmux_tristate_disable(PMUX_PINGRP_ATD);
#ifdef CONFIG_TARGET_MEDCOM_WIDE
- funcmux_select(PERIPH_ID_DVC_I2C, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C1, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C3, FUNCMUX_DEFAULT);
+ tegra20_pinmux_dvc_i2c_i2cp();
+ tegra20_pinmux_i2c1_rm();
+ tegra20_pinmux_i2c3_dtf();
#endif
- funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT);
+ tegra20_pinmux_disp1_ld0_17();
}
diff --git a/board/compal/paz00/paz00.c b/board/compal/paz00/paz00.c
index 98e7cfdc352c..4727c074133b 100644
--- a/board/compal/paz00/paz00.c
+++ b/board/compal/paz00/paz00.c
@@ -9,8 +9,6 @@
#include <common.h>
#include <asm/io.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch/tegra.h>
#include <asm/gpio.h>
#include <mach/board_init.h>
@@ -41,5 +39,5 @@ void tegra_board_early_init_f(void)
pinmux_tristate_disable(PMUX_PINGRP_UAC);
/* For CD GPIO PV5 */
pinmux_tristate_disable(PMUX_PINGRP_GPV);
- funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT);
+ tegra20_pinmux_disp1_ld0_17();
}
diff --git a/board/compulab/trimslice/trimslice.c b/board/compulab/trimslice/trimslice.c
index 775343e338b5..909ad2efaa48 100644
--- a/board/compulab/trimslice/trimslice.c
+++ b/board/compulab/trimslice/trimslice.c
@@ -10,7 +10,6 @@
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/gpio.h>
#include <mach/board_init.h>
#include <mach/pinmux.h>
@@ -30,8 +29,8 @@ void tegra_board_early_init_f(void)
* in the current device tree.
*/
pinmux_tristate_disable(PMUX_PINGRP_UAC);
- funcmux_select(PERIPH_ID_SDMMC1, FUNCMUX_SDMMC1_SDIO1_4BIT);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
+ tegra20_pinmux_sdmmc1_sdio1_4bit();
+ tegra20_pinmux_sdmmc4_atb_gma_4bit();
/* For CD GPIO PP1 */
pinmux_tristate_disable(PMUX_PINGRP_DAP3);
}
diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c
index f40b9c3b3152..5986bcbe0fb5 100644
--- a/board/nvidia/harmony/harmony.c
+++ b/board/nvidia/harmony/harmony.c
@@ -9,7 +9,6 @@
#include <lcd.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch/tegra.h>
#include <asm/gpio.h>
#include <mach/board_init.h>
@@ -26,14 +25,14 @@ void tegra_board_early_init_f(void)
{
pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM);
pinmux_tristate_disable(PMUX_PINGRP_SDC);
- funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
+ tegra20_pinmux_usb2_ulpi();
pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
/* USB2 PHY reset GPIO */
pinmux_tristate_disable(PMUX_PINGRP_UAC);
- funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
- funcmux_select(PERIPH_ID_SDMMC2, FUNCMUX_SDMMC2_DTA_DTD_8BIT);
+ tegra20_pinmux_ndflash_atc();
+ tegra20_pinmux_sdmmc4_atb_gma_gme_8bit();
+ tegra20_pinmux_sdmmc2_dta_dtd_8bit();
/* For power GPIO PI6 */
pinmux_tristate_disable(PMUX_PINGRP_ATA);
/* For CD GPIO PH2 */
@@ -42,5 +41,5 @@ void tegra_board_early_init_f(void)
pinmux_tristate_disable(PMUX_PINGRP_DTB);
/* For CD GPIO PI5 */
pinmux_tristate_disable(PMUX_PINGRP_ATC);
- funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT);
+ tegra20_pinmux_disp1_ld0_17();
}
diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c
index a2d6ba557b7b..651e74482531 100644
--- a/board/nvidia/seaboard/seaboard.c
+++ b/board/nvidia/seaboard/seaboard.c
@@ -11,7 +11,6 @@
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <mach/board.h>
#include <mach/board_init.h>
#include <mach/pinmux.h>
@@ -33,16 +32,16 @@ void tegra_board_early_init_f(void)
{
/* For USB's GPIO PD0. For now, since we have no pinmux in fdt */
pinmux_tristate_disable(PMUX_PINGRP_SLXK);
- funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
- funcmux_select(PERIPH_ID_SDMMC3, FUNCMUX_SDMMC3_SDB_4BIT);
+ tegra20_pinmux_ndflash_atc();
+ tegra20_pinmux_sdmmc4_atb_gma_gme_8bit();
+ tegra20_pinmux_sdmmc3_sdb_4bit();
/* For power GPIO PI6 */
pinmux_tristate_disable(PMUX_PINGRP_ATA);
/* For CD GPIO PI5 */
pinmux_tristate_disable(PMUX_PINGRP_ATC);
- funcmux_select(PERIPH_ID_DVC_I2C, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C1, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C3, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_KBC, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT);
+ tegra20_pinmux_dvc_i2c_i2cp();
+ tegra20_pinmux_i2c1_rm();
+ tegra20_pinmux_i2c3_dtf();
+ tegra20_pinmux_kbc_kbca_f();
+ tegra20_pinmux_disp1_ld0_17();
}
diff --git a/board/nvidia/whistler/whistler.c b/board/nvidia/whistler/whistler.c
index 549b67d5616f..38d94223d83f 100644
--- a/board/nvidia/whistler/whistler.c
+++ b/board/nvidia/whistler/whistler.c
@@ -11,7 +11,6 @@
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/gpio.h>
#include <mach/board_init.h>
#include <mach/pinmux.h>
@@ -25,9 +24,9 @@ void tegra_spl_board_init(void)
void tegra_board_early_init_f(void)
{
- funcmux_select(PERIPH_ID_SDMMC3, FUNCMUX_SDMMC3_SDB_SLXA_8BIT);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATC_ATD_8BIT);
- funcmux_select(PERIPH_ID_DVC_I2C, FUNCMUX_DEFAULT);
+ tegra20_pinmux_sdmmc3_sdb_slxa_8bit();
+ tegra20_pinmux_sdmmc4_atc_atd_8bit();
+ tegra20_pinmux_dvc_i2c_i2cp();
}
int tegra_board_init(void)
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index d6348f794f5e..37d1d9c71eef 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -11,7 +11,6 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch-tegra/tegra.h>
#include <mach/board.h>
#include <mach/board_init.h>
@@ -40,7 +39,7 @@ void tegra_board_early_init_f(void)
pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM);
pinmux_tristate_disable(PMUX_PINGRP_SDC);
/* module internal USB bus to connect ethernet chipset */
- funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
+ tegra20_pinmux_usb2_ulpi();
/* ULPI reference clock output */
pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
@@ -54,18 +53,17 @@ void tegra_board_early_init_f(void)
pinmux_tristate_disable(PMUX_PINGRP_GPV);
/* USBH_PEN: USB 1 aka Tegra USB port 3 VBus */
pinmux_tristate_disable(PMUX_PINGRP_SPIG);
- funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_NDFLASH_KBC_8_BIT);
+ tegra20_pinmux_ndflash_kbc_8bit();
/*
* configure pingroup ATC to something unrelated to
* avoid ATC overriding KBC
*/
pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_GMI);
- funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
+ tegra20_pinmux_sdmmc4_atb_gma_4bit();
pinmux_tristate_disable(PMUX_PINGRP_GMB);
- funcmux_select(PERIPH_ID_DVC_I2C, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C1, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_I2C3, FUNCMUX_DEFAULT);
- funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT);
+ tegra20_pinmux_i2c1_rm();
+ tegra20_pinmux_i2c3_dtf();
+ tegra20_pinmux_disp1_ld0_17();
}
int tegra_board_init(void)
diff --git a/drivers/mtd/nand/tegra_nand.c b/drivers/mtd/nand/tegra_nand.c
index a77db7b65dfa..391b807127c8 100644
--- a/drivers/mtd/nand/tegra_nand.c
+++ b/drivers/mtd/nand/tegra_nand.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors.
- * (C) Copyright 2011 NVIDIA Corporation <www.nvidia.com>
+ * (C) Copyright 2011-2016 NVIDIA Corporation <www.nvidia.com>
* (C) Copyright 2006 Detlev Zundel, dzu at denx.de
* (C) Copyright 2006 DENX Software Engineering
*
@@ -12,7 +12,6 @@
#include <memalign.h>
#include <nand.h>
#include <asm/arch/clock.h>
-#include <asm/arch/funcmux.h>
#include <asm/arch-tegra/clk_rst.h>
#include <asm/errno.h>
#include <asm/gpio.h>
--
2.8.1
More information about the U-Boot
mailing list