debug-macro.S 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* arch/arm/mach-realview/include/mach/debug-macro.S
  2. *
  3. * Debugging macro include header
  4. *
  5. * Copyright (C) 1994-1999 Russell King
  6. * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #define DEBUG_LL_PHYS_BASE 0x10000000
  13. #define DEBUG_LL_UART_OFFSET 0x00009000
  14. #define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
  15. #define DEBUG_LL_UART_OFFSET_RS1 0x00090000
  16. #define DEBUG_LL_VIRT_BASE 0xf8000000
  17. #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT)
  18. .macro addruart,rp,rv,tmp
  19. @ Make an educated guess regarding the memory map:
  20. @ - the original A9 core tile, which has MPCore peripherals
  21. @ located at 0x1e000000, should use UART at 0x10009000
  22. @ - all other (RS1 complaint) tiles use UART mapped
  23. @ at 0x1c090000
  24. mrc p15, 4, \tmp, c15, c0, 0
  25. cmp \tmp, #0x1e000000
  26. @ Original memory map
  27. moveq \rp, #DEBUG_LL_UART_OFFSET
  28. orreq \rv, \rp, #DEBUG_LL_VIRT_BASE
  29. orreq \rp, \rp, #DEBUG_LL_PHYS_BASE
  30. @ RS1 memory map
  31. movne \rp, #DEBUG_LL_UART_OFFSET_RS1
  32. orrne \rv, \rp, #DEBUG_LL_VIRT_BASE
  33. orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
  34. .endm
  35. #include <asm/hardware/debug-pl01x.S>
  36. #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9)
  37. .macro addruart,rp,rv,tmp
  38. mov \rp, #DEBUG_LL_UART_OFFSET
  39. orr \rv, \rp, #DEBUG_LL_VIRT_BASE
  40. orr \rp, \rp, #DEBUG_LL_PHYS_BASE
  41. .endm
  42. #include <asm/hardware/debug-pl01x.S>
  43. #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1)
  44. .macro addruart,rp,rv,tmp
  45. mov \rp, #DEBUG_LL_UART_OFFSET_RS1
  46. orr \rv, \rp, #DEBUG_LL_VIRT_BASE
  47. orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
  48. .endm
  49. #include <asm/hardware/debug-pl01x.S>
  50. #else /* CONFIG_DEBUG_LL_UART_NONE */
  51. .macro addruart, rp, rv, tmp
  52. /* Safe dummy values */
  53. mov \rp, #0
  54. mov \rv, #DEBUG_LL_VIRT_BASE
  55. .endm
  56. .macro senduart,rd,rx
  57. .endm
  58. .macro waituart,rd,rx
  59. .endm
  60. .macro busyuart,rd,rx
  61. .endm
  62. #endif