Tom Warren | 6c43f6c | 2015-02-02 13:22:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2013-2015 |
| 3 | * NVIDIA Corporation <www.nvidia.com> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | /* Tegra210 high-level function multiplexing */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <asm/arch/clock.h> |
| 12 | #include <asm/arch/funcmux.h> |
| 13 | #include <asm/arch/pinmux.h> |
| 14 | |
| 15 | int funcmux_select(enum periph_id id, int config) |
| 16 | { |
| 17 | int bad_config = config != FUNCMUX_DEFAULT; |
| 18 | |
| 19 | switch (id) { |
| 20 | /* |
| 21 | * Add other periph IDs here as needed. |
| 22 | * Note that all pinmux/pads should have already |
| 23 | * been set up in the board pinmux table in |
| 24 | * pinmux-config-<board>.h for all periphs. |
| 25 | * Leave this in for the odd case where a mux |
| 26 | * needs to be changed on-the-fly. |
| 27 | */ |
| 28 | |
| 29 | default: |
| 30 | debug("%s: invalid periph_id %d", __func__, id); |
| 31 | return -1; |
| 32 | } |
| 33 | |
| 34 | if (bad_config) { |
| 35 | debug("%s: invalid config %d for periph_id %d", __func__, |
| 36 | config, id); |
| 37 | return -1; |
| 38 | } |
| 39 | return 0; |
| 40 | } |