debug-macro.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * arch/arm/mach-tegra/include/mach/debug-macro.S
  3. *
  4. * Copyright (C) 2010 Google, Inc.
  5. *
  6. * Author:
  7. * Colin Cross <ccross@google.com>
  8. * Erik Gilling <konkers@google.com>
  9. *
  10. * This software is licensed under the terms of the GNU General Public
  11. * License version 2, as published by the Free Software Foundation, and
  12. * may be copied, distributed, and modified under those terms.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. */
  20. #include <mach/io.h>
  21. .macro addruart,rx, tmp
  22. mrc p15, 0, \rx, c1, c0
  23. tst \rx, #1 @ MMU enabled?
  24. ldreq \rx, =IO_APB_PHYS @ physical
  25. ldrne \rx, =IO_APB_VIRT @ virtual
  26. #if defined(CONFIG_TEGRA_DEBUG_UART_NONE)
  27. #error "A debug UART must be selected in the kernel config to use DEBUG_LL"
  28. #elif defined(CONFIG_TEGRA_DEBUG_UARTA)
  29. orr \rx, \rx, #0x6000
  30. #elif defined(CONFIG_TEGRA_DEBUG_UARTB)
  31. ldr \tmp, =0x6040
  32. orr \rx, \rx, \tmp
  33. #elif defined(CONFIG_TEGRA_DEBUG_UARTC)
  34. orr \rx, \rx, #0x6200
  35. #elif defined(CONFIG_TEGRA_DEBUG_UARTD)
  36. orr \rx, \rx, #0x6300
  37. #elif defined(CONFIG_TEGRA_DEBUG_UARTE)
  38. orr \rx, \rx, #0x6400
  39. #endif
  40. .endm
  41. #define UART_SHIFT 2
  42. #include <asm/hardware/debug-8250.S>