arm-trusted-firmware/plat/imx/imx8m/imx8m_snvs.c
Marco Felsch 8d150c9524 feat(imx8m): enable snvs privileged registers access
Allow non-privileged access to all SNVS registers in case of no TEE is
available.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: I44686a3639a68c72c7eacc80691c294d5c32c9ae
2023-10-05 16:02:10 +02:00

19 lines
370 B
C

/*
* Copyright 2022-2023 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <lib/mmio.h>
#include <platform_def.h>
#define SNVS_HPCOMR U(0x04)
#define SNVS_NPSWA_EN BIT(31)
void enable_snvs_privileged_access(void)
{
unsigned int val;
val = mmio_read_32(IMX_SNVS_BASE + SNVS_HPCOMR);
mmio_write_32(IMX_SNVS_BASE + SNVS_HPCOMR, val | SNVS_NPSWA_EN);
}