Bryan O'Donoghue | 1c7bbca | 2018-06-20 16:56:31 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 7 | #include <lib/mmio.h> |
| 8 | |
Bryan O'Donoghue | 1c7bbca | 2018-06-20 16:56:31 +0100 | [diff] [blame] | 9 | #include <imx_regs.h> |
| 10 | #include <imx_io_mux.h> |
| 11 | |
| 12 | void imx_io_muxc_set_pad_alt_function(uint32_t pad_mux_offset, uint32_t alt_function) |
| 13 | { |
| 14 | uintptr_t addr = (uintptr_t)(MXC_IO_MUXC_BASE + pad_mux_offset); |
| 15 | |
| 16 | mmio_write_32(addr, alt_function); |
| 17 | } |
| 18 | |
| 19 | void imx_io_muxc_set_pad_features(uint32_t pad_feature_offset, uint32_t pad_features) |
| 20 | { |
| 21 | uintptr_t addr = (uintptr_t)(MXC_IO_MUXC_BASE + pad_feature_offset); |
| 22 | |
| 23 | mmio_write_32(addr, pad_features); |
| 24 | } |