bcm63xx.S 748 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Broadcom BCM63xx low-level UART debug
  3. *
  4. * Copyright (C) 2014 Broadcom Corporation
  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_bcm63xx.h>
  11. .macro addruart, rp, rv, tmp
  12. ldr \rp, =CONFIG_DEBUG_UART_PHYS
  13. ldr \rv, =CONFIG_DEBUG_UART_VIRT
  14. .endm
  15. .macro senduart, rd, rx
  16. /* word access do not work */
  17. strb \rd, [\rx, #UART_FIFO_REG]
  18. .endm
  19. .macro waituart, rd, rx
  20. 1001: ldr \rd, [\rx, #UART_IR_REG]
  21. tst \rd, #(1 << UART_IR_TXEMPTY)
  22. beq 1001b
  23. .endm
  24. .macro busyuart, rd, rx
  25. 1002: ldr \rd, [\rx, #UART_IR_REG]
  26. tst \rd, #(1 << UART_IR_TXTRESH)
  27. beq 1002b
  28. .endm