sirf.S 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * arch/arm/mach-prima2/include/mach/debug-macro.S
  3. *
  4. * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
  5. *
  6. * Licensed under GPLv2 or later.
  7. */
  8. #define SIRF_LLUART_TXFIFO_STATUS 0x0114
  9. #define SIRF_LLUART_TXFIFO_DATA 0x0118
  10. #define SIRF_LLUART_TXFIFO_FULL (1 << 5)
  11. #ifdef CONFIG_DEBUG_SIRFATLAS7_UART0
  12. #define SIRF_LLUART_TXFIFO_EMPTY (1 << 8)
  13. #else
  14. #define SIRF_LLUART_TXFIFO_EMPTY (1 << 6)
  15. #endif
  16. .macro addruart, rp, rv, tmp
  17. ldr \rp, =CONFIG_DEBUG_UART_PHYS @ physical
  18. ldr \rv, =CONFIG_DEBUG_UART_VIRT @ virtual
  19. .endm
  20. .macro senduart,rd,rx
  21. str \rd, [\rx, #SIRF_LLUART_TXFIFO_DATA]
  22. .endm
  23. .macro busyuart,rd,rx
  24. .endm
  25. .macro waituart,rd,rx
  26. 1001: ldr \rd, [\rx, #SIRF_LLUART_TXFIFO_STATUS]
  27. tst \rd, #SIRF_LLUART_TXFIFO_EMPTY
  28. beq 1001b
  29. .endm