diff options
author | Tom Rini <trini@konsulko.com> | 2015-07-29 22:58:39 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-07-29 22:58:39 (GMT) |
commit | cc35734358540a1bbaf042fdf9f4cb2de17389ed (patch) | |
tree | 95163aad5ff5430fdd6fb92c52f26eae46957c2c /arch/arm/mach-tegra/tegra210/funcmux.c | |
parent | 488d19cbcace0b87a2d08881eab7356088198903 (diff) | |
parent | 873e3ef90ba98c764af6e05251354332205b9d3a (diff) | |
download | u-boot-cc35734358540a1bbaf042fdf9f4cb2de17389ed.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Diffstat (limited to 'arch/arm/mach-tegra/tegra210/funcmux.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra210/funcmux.c | 40 |
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 0000000..618d228 --- /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; +} |