Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Bryan O'Donoghue | 723f835 | 2018-04-05 19:46:06 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2018 Linaro |
Bryan O'Donoghue | 723f835 | 2018-04-05 19:46:06 +0100 | [diff] [blame] | 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 | } |