law.c 760 B

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