a5ds_common.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <assert.h>
  7. #include <common/debug.h>
  8. #include <lib/mmio.h>
  9. #include <platform_def.h>
  10. #include <plat/arm/common/arm_config.h>
  11. #include <plat/arm/common/plat_arm.h>
  12. #define MAP_PERIPHBASE MAP_REGION_FLAT(PERIPHBASE,\
  13. PERIPH_SIZE,\
  14. MT_DEVICE | MT_RW | MT_SECURE)
  15. #define MAP_A5_PERIPHERALS MAP_REGION_FLAT(A5_PERIPHERALS_BASE,\
  16. A5_PERIPHERALS_SIZE,\
  17. MT_DEVICE | MT_RW | MT_SECURE)
  18. #ifdef IMAGE_BL1
  19. const mmap_region_t plat_arm_mmap[] = {
  20. ARM_MAP_SHARED_RAM,
  21. MAP_PERIPHBASE,
  22. MAP_A5_PERIPHERALS,
  23. MAP_BOOT_RW,
  24. {0}
  25. };
  26. #endif
  27. #ifdef IMAGE_BL2
  28. const mmap_region_t plat_arm_mmap[] = {
  29. ARM_MAP_SHARED_RAM,
  30. MAP_PERIPHBASE,
  31. MAP_A5_PERIPHERALS,
  32. MAP_BOOT_RW,
  33. ARM_MAP_NS_DRAM1,
  34. {0}
  35. };
  36. #endif
  37. #ifdef IMAGE_BL32
  38. const mmap_region_t plat_arm_mmap[] = {
  39. ARM_MAP_SHARED_RAM,
  40. MAP_PERIPHBASE,
  41. MAP_A5_PERIPHERALS,
  42. {0}
  43. };
  44. #endif
  45. ARM_CASSERT_MMAP
  46. unsigned int plat_get_syscnt_freq2(void)
  47. {
  48. return A5DS_TIMER_BASE_FREQUENCY;
  49. }