vf.S 923 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright 2013 Freescale Semiconductor, Inc.
  4. */
  5. #define VF_UART0_BASE_ADDR 0x40027000
  6. #define VF_UART1_BASE_ADDR 0x40028000
  7. #define VF_UART2_BASE_ADDR 0x40029000
  8. #define VF_UART3_BASE_ADDR 0x4002a000
  9. #define VF_UART_BASE_ADDR(n) VF_UART##n##_BASE_ADDR
  10. #define VF_UART_BASE(n) VF_UART_BASE_ADDR(n)
  11. #define VF_UART_PHYSICAL_BASE VF_UART_BASE(CONFIG_DEBUG_VF_UART_PORT)
  12. #define VF_UART_VIRTUAL_BASE 0xfe000000
  13. .macro addruart, rp, rv, tmp
  14. ldr \rp, =VF_UART_PHYSICAL_BASE @ physical
  15. and \rv, \rp, #0xffffff @ offset within 16MB section
  16. add \rv, \rv, #VF_UART_VIRTUAL_BASE
  17. .endm
  18. .macro senduart, rd, rx
  19. strb \rd, [\rx, #0x7] @ Data Register
  20. .endm
  21. .macro busyuart, rd, rx
  22. 1001: ldrb \rd, [\rx, #0x4] @ Status Register 1
  23. tst \rd, #1 << 6 @ TC
  24. beq 1001b @ wait until transmit done
  25. .endm
  26. .macro waituartcts,rd,rx
  27. .endm
  28. .macro waituarttxrdy,rd,rx
  29. .endm