debug-8250.S 719 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * arch/arm/include/asm/hardware/debug-8250.S
  3. *
  4. * Copyright (C) 1994-1999 Russell King
  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. #include <linux/serial_reg.h>
  11. .macro senduart,rd,rx
  12. strb \rd, [\rx, #UART_TX << UART_SHIFT]
  13. .endm
  14. .macro busyuart,rd,rx
  15. 1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT]
  16. and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
  17. teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
  18. bne 1002b
  19. .endm
  20. .macro waituart,rd,rx
  21. #ifdef FLOW_CONTROL
  22. 1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT]
  23. tst \rd, #UART_MSR_CTS
  24. beq 1001b
  25. #endif
  26. .endm