imx8m_snvs.c 370 B

12345678910111213141516171819
  1. /*
  2. * Copyright 2022-2023 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <lib/mmio.h>
  7. #include <platform_def.h>
  8. #define SNVS_HPCOMR U(0x04)
  9. #define SNVS_NPSWA_EN BIT(31)
  10. void enable_snvs_privileged_access(void)
  11. {
  12. unsigned int val;
  13. val = mmio_read_32(IMX_SNVS_BASE + SNVS_HPCOMR);
  14. mmio_write_32(IMX_SNVS_BASE + SNVS_HPCOMR, val | SNVS_NPSWA_EN);
  15. }