debug-macro.S 712 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 1994-1999 Russell King
  3. * Copyright (C) 2008-2009 Telechips
  4. * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
  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. .macro addruart, rp, rv
  12. moveq \rp, #0x90000000 @ physical base address
  13. movne \rv, #0xF1000000 @ virtual base
  14. orr \rp, \rp, #0x00007000 @ UART0
  15. orr \rv, \rv, #0x00007000 @ UART0
  16. .endm
  17. .macro senduart,rd,rx
  18. strb \rd, [\rx, #0x44]
  19. .endm
  20. .macro waituart,rd,rx
  21. .endm
  22. .macro busyuart,rd,rx
  23. 1001:
  24. ldr \rd, [\rx, #0x14]
  25. tst \rd, #0x20
  26. beq 1001b
  27. .endm