1*723f8359SBryan O'Donoghue /* 2*723f8359SBryan O'Donoghue * Copyright 2018 Linaro 3*723f8359SBryan O'Donoghue * 4*723f8359SBryan O'Donoghue * SPDX-License-Identifier: GPL-2.0+ 5*723f8359SBryan O'Donoghue */ 6*723f8359SBryan O'Donoghue 7*723f8359SBryan O'Donoghue #include <asm/io.h> 8*723f8359SBryan O'Donoghue #include <asm/arch/imx-regs.h> 9*723f8359SBryan O'Donoghue #include <linux/bitops.h> 10*723f8359SBryan O'Donoghue 11*723f8359SBryan O'Donoghue #define SNVS_HPCOMR 0x04 12*723f8359SBryan O'Donoghue #define SNVS_HPCOMR_NPSWA_EN BIT(31) 13*723f8359SBryan O'Donoghue 14*723f8359SBryan O'Donoghue void init_snvs(void) 15*723f8359SBryan O'Donoghue { 16*723f8359SBryan O'Donoghue u32 val; 17*723f8359SBryan O'Donoghue 18*723f8359SBryan O'Donoghue /* Ensure SNVS HPCOMR sets NPSWA_EN to allow unpriv access to SNVS LP */ 19*723f8359SBryan O'Donoghue val = readl(SNVS_BASE_ADDR + SNVS_HPCOMR); 20*723f8359SBryan O'Donoghue val |= SNVS_HPCOMR_NPSWA_EN; 21*723f8359SBryan O'Donoghue writel(val, SNVS_BASE_ADDR + SNVS_HPCOMR); 22*723f8359SBryan O'Donoghue } 23