summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/tegra210/funcmux.c
diff options
context:
space:
mode:
authorTom Warren <twarren@nvidia.com>2015-02-02 13:22:29 -0700
committerTom Warren <twarren@nvidia.com>2015-07-28 10:30:19 -0700
commit6c43f6c8d920caa1db01f5d0571a4d9ba720be15 (patch)
treeaa3cabc8a3354f298c2f0ec125094402d653fee3 /arch/arm/mach-tegra/tegra210/funcmux.c
parent56079eccd18a65bd5eea2f6a665862932c61963c (diff)
downloadtalos-obmc-uboot-6c43f6c8d920caa1db01f5d0571a4d9ba720be15.tar.gz
talos-obmc-uboot-6c43f6c8d920caa1db01f5d0571a4d9ba720be15.zip
ARM: Tegra210: Add SoC code/include files for T210
All based off of Tegra124. As a Tegra210 board is brought up, these may change a bit to match the HW more closely, but probably 90% of this is identical to T124. Note that since T210 is a 64-bit build, it has no SPL component, and hence no cpu.c for Tegra210. Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra210/funcmux.c')
-rw-r--r--arch/arm/mach-tegra/tegra210/funcmux.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra210/funcmux.c b/arch/arm/mach-tegra/tegra210/funcmux.c
new file mode 100644
index 0000000000..618d2282e6
--- /dev/null
+++ b/arch/arm/mach-tegra/tegra210/funcmux.c
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2013-2015
+ * 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>
+#include <asm/arch/pinmux.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;
+}
OpenPOWER on IntegriCloud