diff options
Diffstat (limited to 'roms/u-boot/arch/arm/mach-imx/mx7/snvs.c')
-rw-r--r-- | roms/u-boot/arch/arm/mach-imx/mx7/snvs.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/mach-imx/mx7/snvs.c b/roms/u-boot/arch/arm/mach-imx/mx7/snvs.c new file mode 100644 index 000000000..359bbbb41 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-imx/mx7/snvs.c @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 Linaro + */ + +#include <asm/io.h> +#include <asm/arch/imx-regs.h> +#include <linux/bitops.h> + +#define SNVS_HPCOMR 0x04 +#define SNVS_HPCOMR_NPSWA_EN BIT(31) + +void init_snvs(void) +{ + u32 val; + + /* Ensure SNVS HPCOMR sets NPSWA_EN to allow unpriv access to SNVS LP */ + val = readl(SNVS_BASE_ADDR + SNVS_HPCOMR); + val |= SNVS_HPCOMR_NPSWA_EN; + writel(val, SNVS_BASE_ADDR + SNVS_HPCOMR); +} |