vexpress.S 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. .arch armv7-a
  20. @ Make an educated guess regarding the memory map:
  21. @ - the original A9 core tile (based on ARM Cortex-A9 r0p1)
  22. @ should use UART at 0x10009000
  23. @ - all other (RS1 complaint) tiles use UART mapped
  24. @ at 0x1c090000
  25. mrc p15, 0, \rp, c0, c0, 0
  26. movw \rv, #0xc091
  27. movt \rv, #0x410f
  28. cmp \rp, \rv
  29. @ Original memory map
  30. moveq \rp, #DEBUG_LL_UART_OFFSET
  31. orreq \rv, \rp, #DEBUG_LL_VIRT_BASE
  32. orreq \rp, \rp, #DEBUG_LL_PHYS_BASE
  33. @ RS1 memory map
  34. movne \rp, #DEBUG_LL_UART_OFFSET_RS1
  35. orrne \rv, \rp, #DEBUG_LL_VIRT_BASE
  36. orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
  37. .endm
  38. #include <asm/hardware/debug-pl01x.S>
  39. #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9)
  40. .macro addruart,rp,rv,tmp
  41. mov \rp, #DEBUG_LL_UART_OFFSET
  42. orr \rv, \rp, #DEBUG_LL_VIRT_BASE
  43. orr \rp, \rp, #DEBUG_LL_PHYS_BASE
  44. .endm
  45. #include <asm/hardware/debug-pl01x.S>
  46. #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1)
  47. .macro addruart,rp,rv,tmp
  48. mov \rp, #DEBUG_LL_UART_OFFSET_RS1
  49. orr \rv, \rp, #DEBUG_LL_VIRT_BASE
  50. orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
  51. .endm
  52. #include <asm/hardware/debug-pl01x.S>
  53. #else /* CONFIG_DEBUG_LL_UART_NONE */
  54. .macro addruart, rp, rv, tmp
  55. /* Safe dummy values */
  56. mov \rp, #0
  57. mov \rv, #DEBUG_LL_VIRT_BASE
  58. .endm
  59. .macro senduart,rd,rx
  60. .endm
  61. .macro waituart,rd,rx
  62. .endm
  63. .macro busyuart,rd,rx
  64. .endm
  65. #endif