ux500.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Debugging macro include header
  3. *
  4. * Copyright (C) 2009 ST-Ericsson
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. */
  11. #if CONFIG_UX500_DEBUG_UART > 2
  12. #error Invalid Ux500 debug UART
  13. #endif
  14. /*
  15. * DEBUG_LL only works if only one SOC is built in. We don't use #else below
  16. * in order to get "__UX500_UART redefined" warnings if more than one SOC is
  17. * built, so that there's some hint during the build that something is wrong.
  18. */
  19. #ifdef CONFIG_UX500_SOC_DB8500
  20. #define U8500_UART0_PHYS_BASE (0x80120000)
  21. #define U8500_UART1_PHYS_BASE (0x80121000)
  22. #define U8500_UART2_PHYS_BASE (0x80007000)
  23. #define U8500_UART0_VIRT_BASE (0xf8120000)
  24. #define U8500_UART1_VIRT_BASE (0xf8121000)
  25. #define U8500_UART2_VIRT_BASE (0xf8007000)
  26. #define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE
  27. #define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE
  28. #endif
  29. #if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART)
  30. #error Unknown SOC
  31. #endif
  32. #define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
  33. #define UX500_VIRT_UART(n) __UX500_VIRT_UART(n)
  34. #define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
  35. #define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART)
  36. .macro addruart, rp, rv, tmp
  37. ldr \rp, =UART_PHYS_BASE @ no, physical address
  38. ldr \rv, =UART_VIRT_BASE @ yes, virtual address
  39. .endm
  40. #include <debug/pl01x.S>