blob: 7e649b8513665173270a20f88e92af3968398573 [file] [log] [blame]
Bryan O'Donoghue723f8352018-04-05 19:46:06 +01001/*
2 * Copyright 2018 Linaro
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <asm/io.h>
8#include <asm/arch/imx-regs.h>
9#include <linux/bitops.h>
10
11#define SNVS_HPCOMR 0x04
12#define SNVS_HPCOMR_NPSWA_EN BIT(31)
13
14void init_snvs(void)
15{
16 u32 val;
17
18 /* Ensure SNVS HPCOMR sets NPSWA_EN to allow unpriv access to SNVS LP */
19 val = readl(SNVS_BASE_ADDR + SNVS_HPCOMR);
20 val |= SNVS_HPCOMR_NPSWA_EN;
21 writel(val, SNVS_BASE_ADDR + SNVS_HPCOMR);
22}