imx_snvs.c 416 B

12345678910111213141516171819202122
  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_snvs.h>
  9. void imx_snvs_init(void)
  10. {
  11. struct snvs *snvs = (struct snvs *)SNVS_BASE;
  12. uintptr_t addr;
  13. uint32_t val;
  14. addr = (uintptr_t)&snvs->hpcomr;
  15. val = mmio_read_32(addr);
  16. val |= HPCOMR_NPSWA_EN;
  17. mmio_write_32(addr, val);
  18. }