debug-macro.S 792 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* linux/include/asm-arm/arch-aaec2000/debug-macro.S
  2. *
  3. * Debugging macro include header
  4. *
  5. * Copyright (c) 2005 Nicolas Bellido Y Ortega
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. .macro addruart,rx
  12. mrc p15, 0, \rx, c1, c0
  13. tst \rx, #1 @ MMU enabled?
  14. moveq \rx, #0x80000000 @ physical
  15. movne \rx, #io_p2v(0x80000000) @ virtual
  16. orr \rx, \rx, #0x00000800
  17. .endm
  18. .macro senduart,rd,rx
  19. str \rd, [\rx, #0]
  20. .endm
  21. .macro busyuart,rd,rx
  22. 1002: ldr \rd, [\rx, #0x10]
  23. tst \rd, #(1 << 7)
  24. beq 1002b
  25. .endm
  26. .macro waituart,rd,rx
  27. #if 0
  28. 1001: ldr \rd, [\rx, #0x10]
  29. tst \rd, #(1 << 5)
  30. beq 1001b
  31. #endif
  32. .endm