board_common.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) 2016 - 2020, Broadcom
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <brcm_def.h>
  7. #include <plat_brcm.h>
  8. #if IMAGE_BL2
  9. const mmap_region_t plat_brcm_mmap[] = {
  10. HSLS_REGION,
  11. BRCM_MAP_SHARED_RAM,
  12. BRCM_MAP_NAND_RO,
  13. BRCM_MAP_QSPI_RO,
  14. #ifdef PERIPH0_REGION
  15. PERIPH0_REGION,
  16. #endif
  17. #ifdef PERIPH1_REGION
  18. PERIPH1_REGION,
  19. #endif
  20. #ifdef USE_DDR
  21. BRCM_MAP_NS_DRAM1,
  22. #if BRCM_BL31_IN_DRAM
  23. BRCM_MAP_BL31_SEC_DRAM,
  24. #endif
  25. #else
  26. #ifdef BRCM_MAP_EXT_SRAM
  27. BRCM_MAP_EXT_SRAM,
  28. #endif
  29. #endif
  30. #if defined(USE_CRMU_SRAM) && defined(CRMU_SRAM_BASE)
  31. CRMU_SRAM_REGION,
  32. #endif
  33. {0}
  34. };
  35. #endif
  36. #if IMAGE_BL31
  37. const mmap_region_t plat_brcm_mmap[] = {
  38. HSLS_REGION,
  39. #ifdef PERIPH0_REGION
  40. PERIPH0_REGION,
  41. #endif
  42. #ifdef PERIPH1_REGION
  43. PERIPH1_REGION,
  44. #endif
  45. #ifdef PERIPH2_REGION
  46. PERIPH2_REGION,
  47. #endif
  48. #ifdef USB_REGION
  49. USB_REGION,
  50. #endif
  51. #ifdef USE_DDR
  52. BRCM_MAP_NS_DRAM1,
  53. #ifdef BRCM_MAP_NS_SHARED_DRAM
  54. BRCM_MAP_NS_SHARED_DRAM,
  55. #endif
  56. #else
  57. #ifdef BRCM_MAP_EXT_SRAM
  58. BRCM_MAP_EXT_SRAM,
  59. #endif
  60. #endif
  61. #if defined(USE_CRMU_SRAM) && defined(CRMU_SRAM_BASE)
  62. CRMU_SRAM_REGION,
  63. #endif
  64. {0}
  65. };
  66. #endif
  67. CASSERT((ARRAY_SIZE(plat_brcm_mmap) - 1) <= PLAT_BRCM_MMAP_ENTRIES,
  68. assert_plat_brcm_mmap_mismatch);
  69. CASSERT((PLAT_BRCM_MMAP_ENTRIES + BRCM_BL_REGIONS) <= MAX_MMAP_REGIONS,
  70. assert_max_mmap_regions);