imx_io_mux.c 587 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <lib/mmio.h>
  7. #include <imx_regs.h>
  8. #include <imx_io_mux.h>
  9. void imx_io_muxc_set_pad_alt_function(uint32_t pad_mux_offset, uint32_t alt_function)
  10. {
  11. uintptr_t addr = (uintptr_t)(MXC_IO_MUXC_BASE + pad_mux_offset);
  12. mmio_write_32(addr, alt_function);
  13. }
  14. void imx_io_muxc_set_pad_features(uint32_t pad_feature_offset, uint32_t pad_features)
  15. {
  16. uintptr_t addr = (uintptr_t)(MXC_IO_MUXC_BASE + pad_feature_offset);
  17. mmio_write_32(addr, pad_features);
  18. }