aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mx7/snvs.c
blob: 7e649b8513665173270a20f88e92af3968398573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright 2018 Linaro
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#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);
}