debug-macro.S 762 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* arch/arm/mach-aaec2000/include/mach/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. #include "hardware.h"
  12. .macro addruart, rp, rv
  13. mov \rp, 0x00000800
  14. orr \rv, \rp, #io_p2v(0x80000000) @ virtual
  15. orr \rp, \rp, #0x80000000 @ physical
  16. .endm
  17. .macro senduart,rd,rx
  18. str \rd, [\rx, #0]
  19. .endm
  20. .macro busyuart,rd,rx
  21. 1002: ldr \rd, [\rx, #0x10]
  22. tst \rd, #(1 << 7)
  23. beq 1002b
  24. .endm
  25. .macro waituart,rd,rx
  26. #if 0
  27. 1001: ldr \rd, [\rx, #0x10]
  28. tst \rd, #(1 << 5)
  29. beq 1001b
  30. #endif
  31. .endm