| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <device/mmio.h> |
| 4 | #include <soc/addressmap.h> |
| 5 | |
| 6 | #include "pinmux.h" |
| 7 | |
| 8 | static uint32_t *pinmux_regs = (void *)TEGRA_APB_PINMUX_BASE; |
| 9 | |
| 10 | void pinmux_set_config(int pin_index, uint32_t config) |
| 11 | { |
| 12 | write32(&pinmux_regs[pin_index], config); |
| 13 | } |
| 14 | |
| 15 | uint32_t pinmux_get_config(int pin_index) |
| 16 | { |
| 17 | return read32(&pinmux_regs[pin_index]); |
| 18 | } |