debug-macro.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <mach/hardware.h>
  12. #if CONFIG_UX500_DEBUG_UART > 2
  13. #error Invalid Ux500 debug UART
  14. #endif
  15. /*
  16. * DEBUG_LL only works if only one SOC is built in. We don't use #else below
  17. * in order to get "__UX500_UART redefined" warnings if more than one SOC is
  18. * built, so that there's some hint during the build that something is wrong.
  19. */
  20. #ifdef CONFIG_UX500_SOC_DB5500
  21. #define __UX500_UART(n) U5500_UART##n##_BASE
  22. #endif
  23. #ifdef CONFIG_UX500_SOC_DB8500
  24. #define __UX500_UART(n) U8500_UART##n##_BASE
  25. #endif
  26. #ifndef __UX500_UART
  27. #error Unknown SOC
  28. #endif
  29. #define UX500_UART(n) __UX500_UART(n)
  30. #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)
  31. .macro addruart, rp, rv
  32. ldr \rp, =UART_BASE @ no, physical address
  33. ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address
  34. .endm
  35. #include <asm/hardware/debug-pl01x.S>