zynqmp-r5.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef __ZYNQMP_R5_H__
  2. #define __ZYNQMP_R5_H__
  3. #include "xparameters.h"
  4. #define __REG64(x) (*((volatile rt_uint64_t *)(x)))
  5. #define __REG32(x) (*((volatile rt_uint32_t *)(x)))
  6. #define __REG16(x) (*((volatile rt_uint16_t *)(x)))
  7. #define __REG8(x) (*((volatile rt_uint8_t *)(x)))
  8. #define ZynqMP_CRL_APB_BASEADDR XPAR_PSU_CRL_APB_S_AXI_BASEADDR
  9. #define ZynqMP_CRL_APB_IOPLL_CTRL 0x020
  10. #define ZynqMP_CRL_APB_IOPLL_CFG 0x024
  11. #define ZynqMP_CRL_APB_UART0_REF_CTRL 0x074
  12. #define ZynqMP_CRL_APB_UART1_REF_CTRL 0x078
  13. #define ZynqMP_CRL_APB_LPD_LSBUS_CTRL 0x0AC
  14. #define ZynqMP_CRL_APB_RESET_CTRL 0x218
  15. #define ZynqMP_RESET_MASK 0x10
  16. #define ZynqMP_GIC_CPU_BASE XPAR_PSU_RCPU_GIC_BASEADDR /* Generic interrupt controller CPU interface */
  17. #define ZynqMP_GIC_DIST_BASE XPAR_PSU_RCPU_GIC_DIST_BASEADDR /* Generic interrupt controller distributor */
  18. /* ZynqMP on-board gic irq sources */
  19. #define IRQ_ZynqMP_MAXNR 195
  20. #define ARM_GIC_NR_IRQS IRQ_ZynqMP_MAXNR
  21. /* only one GIC available */
  22. #define ARM_GIC_MAX_NR 1
  23. #define GIC_ACK_INTID_MASK 0x000003FF
  24. #define ZynqMP_R5_0_ID 0
  25. #define ZynqMP_R5_1_ID 1
  26. #define ZynqMP_R5_CPU_ID ZynqMP_R5_0_ID
  27. static inline unsigned long rt_cpu_get_smp_id(void)
  28. {
  29. return ZynqMP_R5_CPU_ID;
  30. }
  31. #endif