debug-macro.S 949 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * arch/arm/plat-spear/include/plat/debug-macro.S
  3. *
  4. * Debugging macro include header for spear platform
  5. *
  6. * Copyright (C) 2009 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #include <linux/amba/serial.h>
  14. #include <mach/hardware.h>
  15. .macro addruart, rp, rv, tmp
  16. mov \rp, #SPEAR_DBG_UART_BASE @ Physical base
  17. mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base
  18. .endm
  19. .macro senduart, rd, rx
  20. strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER
  21. .endm
  22. .macro waituart, rd, rx
  23. 1001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER
  24. tst \rd, #UART01x_FR_TXFF @ TX_FULL
  25. bne 1001b
  26. .endm
  27. .macro busyuart, rd, rx
  28. 1002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER
  29. tst \rd, #UART011_FR_TXFE @ TX_EMPTY
  30. beq 1002b
  31. .endm