u-boot/arch/arm/mach-imx/snvs.c
Ian Ray d6893740c1 arm: mach-imx: move snvs module
Commit 723f8359c1 ("imx: mx7: snvs: Add an SNVS init routine") noted
that the init_snvs() call likely applies to other i.MX processors, and
this has been found to be true for i.MX8MP.

Move snvs module for future re-use.

Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
2024-11-09 08:55:04 -03:00

21 lines
440 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 Linaro
*/
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <linux/bitops.h>
#define SNVS_HPCOMR 0x04
#define SNVS_HPCOMR_NPSWA_EN BIT(31)
void init_snvs(void)
{
u32 val;
/* Ensure SNVS HPCOMR sets NPSWA_EN to allow unpriv access to SNVS LP */
val = readl(SNVS_BASE_ADDR + SNVS_HPCOMR);
val |= SNVS_HPCOMR_NPSWA_EN;
writel(val, SNVS_BASE_ADDR + SNVS_HPCOMR);
}