1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/mmio.h>
4 #include <bootblock_common.h>
6 #include <soc/mmu_operations.h>
9 void bootblock_soc_init(void)
13 /* all ddr range non-secure */
14 write32(&rk3399_pmusgrf
->ddr_rgn_con
[16], 0xff << 16 | 0);
16 /* tzma_rosize = 0, all sram non-secure */
17 write32(&rk3399_pmusgrf
->soc_con4
, 0x3ff << 16 | 0);
19 /* emmc master secure */
20 write32(&rk3399_pmusgrf
->soc_con7
, 1 << 23 | 1 << 24 | 0 << 8 | 0 << 7);
22 /* glb_slv_secure_bypass */
23 write32(&rk3399_pmusgrf
->pmu_slv_con0
, 1 << 16 | 1);