debug-macro.S 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE)
  19. .macro addruart, rp, rv
  20. ldr \rp, =MSM_DEBUG_UART_PHYS
  21. ldr \rv, =MSM_DEBUG_UART_BASE
  22. .endm
  23. .macro senduart,rd,rx
  24. teq \rx, #0
  25. strne \rd, [\rx, #0x0C]
  26. .endm
  27. .macro waituart,rd,rx
  28. @ wait for TX_READY
  29. 1001: ldr \rd, [\rx, #0x08]
  30. tst \rd, #0x04
  31. beq 1001b
  32. .endm
  33. #else
  34. .macro addruart, rp, rv
  35. mov \rv, #0xff000000
  36. orr \rv, \rv, #0x00f00000
  37. .endm
  38. .macro senduart,rd,rx
  39. .endm
  40. .macro waituart,rd,rx
  41. .endm
  42. #endif
  43. .macro busyuart,rd,rx
  44. .endm