Commit 341238fd135dc61cd387546c77901a3eac478a36
Committed by
York Sun
1 parent
71fe22256c
Exists in
v2017.01-smarct4x
and in
25 other branches
arm: fsl-layerscape: move forward the non-secure access permission setup
Move forward the basic non-secure access enable operation, so the subsequent individual device access permission can override it. And collect the dispersed callers in board level, and then move them to SoC level. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Showing 10 changed files with 10 additions and 36 deletions Side-by-side Diff
- arch/arm/cpu/armv7/ls102xa/soc.c
- arch/arm/cpu/armv8/fsl-layerscape/soc.c
- arch/arm/cpu/armv8/fsl-layerscape/spl.c
- board/freescale/ls1012afrdm/ls1012afrdm.c
- board/freescale/ls1012aqds/ls1012aqds.c
- board/freescale/ls1012ardb/ls1012ardb.c
- board/freescale/ls1021aqds/ls1021aqds.c
- board/freescale/ls1021atwr/ls1021atwr.c
- board/freescale/ls1043aqds/ls1043aqds.c
- board/freescale/ls1043ardb/ls1043ardb.c
arch/arm/cpu/armv7/ls102xa/soc.c
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | #include <asm/arch/immap_ls102xa.h> |
11 | 11 | #include <asm/arch/ls102xa_soc.h> |
12 | 12 | #include <asm/arch/ls102xa_stream_id.h> |
13 | +#include <fsl_csu.h> | |
13 | 14 | |
14 | 15 | struct liodn_id_table sec_liodn_tbl[] = { |
15 | 16 | SET_SEC_JR_LIODN_ENTRY(0, 0x10, 0x10), |
... | ... | @@ -63,6 +64,10 @@ |
63 | 64 | struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; |
64 | 65 | struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR; |
65 | 66 | unsigned int major; |
67 | + | |
68 | +#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
69 | + enable_layerscape_ns_access(); | |
70 | +#endif | |
66 | 71 | |
67 | 72 | #ifdef CONFIG_FSL_QSPI |
68 | 73 | out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL); |
arch/arm/cpu/armv8/fsl-layerscape/soc.c
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | #include <asm/io.h> |
13 | 13 | #include <asm/global_data.h> |
14 | 14 | #include <asm/arch-fsl-layerscape/config.h> |
15 | +#include <fsl_csu.h> | |
15 | 16 | #ifdef CONFIG_SYS_FSL_DDR |
16 | 17 | #include <fsl_ddr_sdram.h> |
17 | 18 | #include <fsl_ddr.h> |
... | ... | @@ -304,6 +305,10 @@ |
304 | 305 | { |
305 | 306 | struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR; |
306 | 307 | struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; |
308 | + | |
309 | +#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
310 | + enable_layerscape_ns_access(); | |
311 | +#endif | |
307 | 312 | |
308 | 313 | #ifdef CONFIG_FSL_IFC |
309 | 314 | init_early_memctl_regs(); /* tighten IFC timing */ |
arch/arm/cpu/armv8/fsl-layerscape/spl.c
... | ... | @@ -8,7 +8,6 @@ |
8 | 8 | #include <spl.h> |
9 | 9 | #include <asm/io.h> |
10 | 10 | #include <fsl_ifc.h> |
11 | -#include <fsl_csu.h> | |
12 | 11 | #include <i2c.h> |
13 | 12 | |
14 | 13 | DECLARE_GLOBAL_DATA_PTR; |
... | ... | @@ -66,9 +65,6 @@ |
66 | 65 | /* Clear the BSS */ |
67 | 66 | memset(__bss_start, 0, __bss_end - __bss_start); |
68 | 67 | |
69 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
70 | - enable_layerscape_ns_access(); | |
71 | -#endif | |
72 | 68 | board_init_r(NULL, 0); |
73 | 69 | } |
74 | 70 | #endif |
board/freescale/ls1012afrdm/ls1012afrdm.c
... | ... | @@ -11,7 +11,6 @@ |
11 | 11 | #include <asm/arch/fsl_serdes.h> |
12 | 12 | #include <asm/arch/soc.h> |
13 | 13 | #include <hwconfig.h> |
14 | -#include <fsl_csu.h> | |
15 | 14 | #include <environment.h> |
16 | 15 | #include <fsl_mmdc.h> |
17 | 16 | #include <netdev.h> |
... | ... | @@ -173,10 +172,6 @@ |
173 | 172 | |
174 | 173 | #ifdef CONFIG_ENV_IS_NOWHERE |
175 | 174 | gd->env_addr = (ulong)&default_environment[0]; |
176 | -#endif | |
177 | - | |
178 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
179 | - enable_layerscape_ns_access(); | |
180 | 175 | #endif |
181 | 176 | |
182 | 177 | return 0; |
board/freescale/ls1012aqds/ls1012aqds.c
... | ... | @@ -17,7 +17,6 @@ |
17 | 17 | #include <mmc.h> |
18 | 18 | #include <scsi.h> |
19 | 19 | #include <fm_eth.h> |
20 | -#include <fsl_csu.h> | |
21 | 20 | #include <fsl_esdhc.h> |
22 | 21 | #include <fsl_mmdc.h> |
23 | 22 | #include <spl.h> |
... | ... | @@ -206,10 +205,6 @@ |
206 | 205 | * transaction */ |
207 | 206 | out_le32(&cci->ctrl_ord, |
208 | 207 | CCI400_CTRLORD_EN_BARRIER); |
209 | - | |
210 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
211 | - enable_layerscape_ns_access(); | |
212 | -#endif | |
213 | 208 | |
214 | 209 | #ifdef CONFIG_ENV_IS_NOWHERE |
215 | 210 | gd->env_addr = (ulong)&default_environment[0]; |
board/freescale/ls1012ardb/ls1012ardb.c
... | ... | @@ -14,7 +14,6 @@ |
14 | 14 | #include <ahci.h> |
15 | 15 | #include <mmc.h> |
16 | 16 | #include <scsi.h> |
17 | -#include <fsl_csu.h> | |
18 | 17 | #include <fsl_esdhc.h> |
19 | 18 | #include <environment.h> |
20 | 19 | #include <fsl_mmdc.h> |
... | ... | @@ -205,10 +204,6 @@ |
205 | 204 | |
206 | 205 | #ifdef CONFIG_ENV_IS_NOWHERE |
207 | 206 | gd->env_addr = (ulong)&default_environment[0]; |
208 | -#endif | |
209 | - | |
210 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
211 | - enable_layerscape_ns_access(); | |
212 | 207 | #endif |
213 | 208 | |
214 | 209 | return 0; |
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/ls1043aqds/ls1043aqds.c
... | ... | @@ -17,7 +17,6 @@ |
17 | 17 | #include <mmc.h> |
18 | 18 | #include <scsi.h> |
19 | 19 | #include <fm_eth.h> |
20 | -#include <fsl_csu.h> | |
21 | 20 | #include <fsl_esdhc.h> |
22 | 21 | #include <fsl_ifc.h> |
23 | 22 | #include <spl.h> |
... | ... | @@ -316,9 +315,6 @@ |
316 | 315 | config_serdes_mux(); |
317 | 316 | #endif |
318 | 317 | |
319 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
320 | - enable_layerscape_ns_access(); | |
321 | -#endif | |
322 | 318 | return 0; |
323 | 319 | } |
324 | 320 |
board/freescale/ls1043ardb/ls1043ardb.c
... | ... | @@ -16,7 +16,6 @@ |
16 | 16 | #include <mmc.h> |
17 | 17 | #include <scsi.h> |
18 | 18 | #include <fm_eth.h> |
19 | -#include <fsl_csu.h> | |
20 | 19 | #include <fsl_esdhc.h> |
21 | 20 | #include <fsl_ifc.h> |
22 | 21 | #include <fsl_sec.h> |
... | ... | @@ -88,10 +87,6 @@ |
88 | 87 | |
89 | 88 | #ifdef CONFIG_FSL_IFC |
90 | 89 | init_final_memctl_regs(); |
91 | -#endif | |
92 | - | |
93 | -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS | |
94 | - enable_layerscape_ns_access(); | |
95 | 90 | #endif |
96 | 91 | |
97 | 92 | #ifdef CONFIG_SECURE_BOOT |