8250_32.S 733 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2011 Picochip Ltd., Jamie Iles
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
  9. * accesses to the 8250.
  10. */
  11. #include <linux/serial_reg.h>
  12. .macro senduart,rd,rx
  13. str \rd, [\rx, #UART_TX << UART_SHIFT]
  14. .endm
  15. .macro busyuart,rd,rx
  16. 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
  17. and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
  18. teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
  19. bne 1002b
  20. .endm
  21. /* The UART's don't have any flow control IO's wired up. */
  22. .macro waituart,rd,rx
  23. .endm