debug-macro.S 1012 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* arch/arm/mach-zynq/include/mach/debug-macro.S
  2. *
  3. * Debugging macro include header
  4. *
  5. * Copyright (C) 2011 Xilinx
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <mach/zynq_soc.h>
  17. #include <mach/uart.h>
  18. .macro addruart, rp, rv
  19. ldr \rp, =LL_UART_PADDR @ physical
  20. ldr \rv, =LL_UART_VADDR @ virtual
  21. .endm
  22. .macro senduart,rd,rx
  23. str \rd, [\rx, #UART_FIFO_OFFSET] @ TXDATA
  24. .endm
  25. .macro waituart,rd,rx
  26. .endm
  27. .macro busyuart,rd,rx
  28. 1002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register
  29. tst \rd, #UART_SR_TXFULL @
  30. bne 1002b @ wait if FIFO is full
  31. .endm