Bryan O'Donoghue | 723f835 | 2018-04-05 19:46:06 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 14 | void 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 | } |