debug-macro.S 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* arch/arm/mach-msm7200/include/mach/debug-macro.S
  2. *
  3. * Copyright (C) 2007 Google, Inc.
  4. * Author: Brian Swetland <swetland@google.com>
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #include <mach/hardware.h>
  17. #include <mach/msm_iomap.h>
  18. .macro addruart,rx
  19. @ see if the MMU is enabled and select appropriate base address
  20. mrc p15, 0, \rx, c1, c0
  21. tst \rx, #1
  22. ldreq \rx, =MSM_UART1_PHYS
  23. movne \rx, #0
  24. .endm
  25. .macro senduart,rd,rx
  26. teq \rx, #0
  27. strne \rd, [\rx, #0x0C]
  28. .endm
  29. .macro waituart,rd,rx
  30. @ wait for TX_READY
  31. teq \rx, #0
  32. bne 2f
  33. 1: ldr \rd, [\rx, #0x08]
  34. tst \rd, #0x04
  35. beq 1b
  36. 2:
  37. .endm
  38. .macro busyuart,rd,rx
  39. .endm