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