digicolor.S 756 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Debugging macro include header for Conexant Digicolor USART
  3. *
  4. * Copyright (C) 2014 Paradox Innovation Ltd.
  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. #define UA0_STATUS 0x0742
  12. #define UA0_EMI_REC 0x0744
  13. #define UA0_STATUS_TX_READY 0x40
  14. #ifdef CONFIG_DEBUG_UART_PHYS
  15. .macro addruart, rp, rv, tmp
  16. ldr \rp, =CONFIG_DEBUG_UART_PHYS
  17. ldr \rv, =CONFIG_DEBUG_UART_VIRT
  18. .endm
  19. #endif
  20. .macro senduart,rd,rx
  21. strb \rd, [\rx, #UA0_EMI_REC]
  22. .endm
  23. .macro waituart,rd,rx
  24. .endm
  25. .macro busyuart,rd,rx
  26. 1001: ldrb \rd, [\rx, #UA0_STATUS]
  27. tst \rd, #UA0_STATUS_TX_READY
  28. beq 1001b
  29. .endm