law.c 754 B

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