debug-macro.S 992 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * arch/arm/mach-ks8695/include/mach/debug-macro.S
  3. *
  4. * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
  5. * Copyright (C) 2006 Simtec Electronics
  6. *
  7. * KS8695 - Debug macros
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <mach/hardware.h>
  14. #include <mach/regs-uart.h>
  15. .macro addruart, rp, rv
  16. ldr \rp, =KS8695_UART_PA @ physical base address
  17. ldr \rv, =KS8695_UART_VA @ virtual base address
  18. .endm
  19. .macro senduart, rd, rx
  20. str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register
  21. .endm
  22. .macro busyuart, rd, rx
  23. 1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
  24. tst \rd, #URLS_URTE @ Holding & Shift registers empty?
  25. beq 1001b
  26. .endm
  27. .macro waituart, rd, rx
  28. 1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
  29. tst \rd, #URLS_URTHRE @ Holding Register empty?
  30. beq 1001b
  31. .endm