ux500.S 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Debugging macro include header
  4. *
  5. * Copyright (C) 2009 ST-Ericsson
  6. */
  7. #if CONFIG_UX500_DEBUG_UART > 2
  8. #error Invalid Ux500 debug UART
  9. #endif
  10. /*
  11. * DEBUG_LL only works if only one SOC is built in. We don't use #else below
  12. * in order to get "__UX500_UART redefined" warnings if more than one SOC is
  13. * built, so that there's some hint during the build that something is wrong.
  14. */
  15. #ifdef CONFIG_UX500_SOC_DB8500
  16. #define U8500_UART0_PHYS_BASE (0x80120000)
  17. #define U8500_UART1_PHYS_BASE (0x80121000)
  18. #define U8500_UART2_PHYS_BASE (0x80007000)
  19. #define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE
  20. #endif
  21. #if !defined(__UX500_PHYS_UART)
  22. #error Unknown SOC
  23. #endif
  24. #define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
  25. #define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
  26. #define UART_VIRT_BASE (0xfff07000)
  27. .macro addruart, rp, rv, tmp
  28. ldr \rp, =UART_PHYS_BASE @ no, physical address
  29. ldr \rv, =UART_VIRT_BASE @ yes, virtual address
  30. .endm
  31. #include <debug/pl01x.S>