blob: 7874a6869078808c62d331a19c57aff5ae3631fa [file] [log] [blame]
Marco Felsch2d6c08f2023-09-05 17:15:35 +02001/*
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
13void 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}