debug-macro.S 951 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  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, rp, rv, tmp
  19. #ifdef MSM_DEBUG_UART_PHYS
  20. ldr \rp, =MSM_DEBUG_UART_PHYS
  21. ldr \rv, =MSM_DEBUG_UART_BASE
  22. #endif
  23. .endm
  24. .macro senduart,rd,rx
  25. teq \rx, #0
  26. strne \rd, [\rx, #0x0C]
  27. .endm
  28. .macro waituart,rd,rx
  29. @ wait for TX_READY
  30. 1001: ldr \rd, [\rx, #0x08]
  31. tst \rd, #0x04
  32. beq 1001b
  33. .endm
  34. .macro busyuart,rd,rx
  35. .endm