mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-06 11:43:45 +00:00

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>
21 lines
440 B
C
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);
|
|
}
|