xref: /openbmc/u-boot/board/varisys/cyrus/law.c (revision 57efeb04)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Author: Adrian Cox
4  * Based on corenet_ds law files.
5  */
6 
7 #include <common.h>
8 #include <asm/fsl_law.h>
9 #include <asm/mmu.h>
10 
11 struct law_entry law_table[] = {
12 	SET_LAW(CONFIG_SYS_LBC0_BASE_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_LBC),
13 	SET_LAW(CONFIG_SYS_LBC1_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
14 #ifdef CONFIG_SYS_BMAN_MEM_PHYS
15 	SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_BMAN),
16 #endif
17 #ifdef CONFIG_SYS_QMAN_MEM_PHYS
18 	SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_QMAN),
19 #endif
20 #ifdef CONFIG_SYS_DCSRBAR_PHYS
21 	/* Limit DCSR to 32M to access NPC Trace Buffer */
22 	SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_DCSR),
23 #endif
24 };
25 
26 int num_law_entries = ARRAY_SIZE(law_table);
27