snvs.c 440 B

123456789101112131415161718192021
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2018 Linaro
  4. */
  5. #include <asm/io.h>
  6. #include <asm/arch/imx-regs.h>
  7. #include <linux/bitops.h>
  8. #define SNVS_HPCOMR 0x04
  9. #define SNVS_HPCOMR_NPSWA_EN BIT(31)
  10. void init_snvs(void)
  11. {
  12. u32 val;
  13. /* Ensure SNVS HPCOMR sets NPSWA_EN to allow unpriv access to SNVS LP */
  14. val = readl(SNVS_BASE_ADDR + SNVS_HPCOMR);
  15. val |= SNVS_HPCOMR_NPSWA_EN;
  16. writel(val, SNVS_BASE_ADDR + SNVS_HPCOMR);
  17. }