blob: 8b1b118b5510bc5cc7f933be91e4e90a7d7afe49 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Andy Fleming87e29872015-11-04 15:48:32 -06002/*
3 * Author: Adrian Cox
4 * Based on corenet_ds law files.
Andy Fleming87e29872015-11-04 15:48:32 -06005 */
6
7#include <common.h>
8#include <asm/fsl_law.h>
9#include <asm/mmu.h>
10
11struct 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
26int num_law_entries = ARRAY_SIZE(law_table);