Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Andy Fleming | 87e2987 | 2015-11-04 15:48:32 -0600 | [diff] [blame] | 2 | /* |
| 3 | * Author: Adrian Cox |
| 4 | * Based on corenet_ds law files. |
Andy Fleming | 87e2987 | 2015-11-04 15:48:32 -0600 | [diff] [blame] | 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); |