blob: 359bbbb41c7ac3e6a22a25870d2b2c28cb117707 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Bryan O'Donoghue723f8352018-04-05 19:46:06 +01002/*
3 * Copyright 2018 Linaro
Bryan O'Donoghue723f8352018-04-05 19:46:06 +01004 */
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
13void 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}