debug-macro.S 894 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* linux/include/asm-arm/arch-imx/debug-macro.S
  2. *
  3. * Debugging macro include header
  4. *
  5. * Copyright (C) 1994-1999 Russell King
  6. * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. */
  13. #include <asm/arch/hardware.h>
  14. #ifdef CONFIG_MACH_MX31ADS
  15. #include <asm/arch/board-mx31ads.h>
  16. #endif
  17. .macro addruart,rx
  18. mrc p15, 0, \rx, c1, c0
  19. tst \rx, #1 @ MMU enabled?
  20. ldreq \rx, =MXC_LL_UART_PADDR @ physical
  21. ldrne \rx, =MXC_LL_UART_VADDR @ virtual
  22. .endm
  23. .macro senduart,rd,rx
  24. str \rd, [\rx, #0x40] @ TXDATA
  25. .endm
  26. .macro waituart,rd,rx
  27. .endm
  28. .macro busyuart,rd,rx
  29. 1002: ldr \rd, [\rx, #0x98] @ SR2
  30. tst \rd, #1 << 3 @ TXDC
  31. beq 1002b @ wait until transmit done
  32. .endm