debug-macro.S 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Debugging macro include header
  3. *
  4. * Embedded Alley Solutions, Inc <source@embeddedalley.com>
  5. *
  6. * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
  7. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  8. */
  9. /*
  10. * The code contained herein is licensed under the GNU General Public
  11. * License. You may obtain a copy of the GNU General Public License
  12. * Version 2 or later at the following locations:
  13. *
  14. * http://www.opensource.org/licenses/gpl-license.html
  15. * http://www.gnu.org/copyleft/gpl.html
  16. */
  17. .macro addruart, rp, rv
  18. mov \rp, #0x00070000
  19. add \rv, \rp, #0xf0000000 @ virtual base
  20. add \rp, \rp, #0x80000000 @ physical base
  21. .endm
  22. .macro senduart,rd,rx
  23. strb \rd, [\rx, #0] @ data register at 0
  24. .endm
  25. .macro waituart,rd,rx
  26. 1001: ldr \rd, [\rx, #0x18] @ UARTFLG
  27. tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
  28. bne 1001b
  29. .endm
  30. .macro busyuart,rd,rx
  31. 1001: ldr \rd, [\rx, #0x18] @ UARTFLG
  32. tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
  33. bne 1001b
  34. .endm