Marco Felsch | 2d6c08f | 2023-09-05 17:15:35 +0200 | [diff] [blame] | 1 | /* |
2 | * Copyright 2022-2023 NXP | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: BSD-3-Clause | ||||
5 | */ | ||||
6 | |||||
7 | #include <lib/mmio.h> | ||||
8 | #include <platform_def.h> | ||||
9 | |||||
10 | #define SNVS_HPCOMR U(0x04) | ||||
11 | #define SNVS_NPSWA_EN BIT(31) | ||||
12 | |||||
13 | void enable_snvs_privileged_access(void) | ||||
14 | { | ||||
15 | unsigned int val; | ||||
16 | |||||
17 | val = mmio_read_32(IMX_SNVS_BASE + SNVS_HPCOMR); | ||||
18 | mmio_write_32(IMX_SNVS_BASE + SNVS_HPCOMR, val | SNVS_NPSWA_EN); | ||||
19 | } |