debug-macro.S 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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, rp, rv
  22. ldr \rp, =IO_APB_PHYS @ physical
  23. ldr \rv, =IO_APB_VIRT @ virtual
  24. #if defined(CONFIG_TEGRA_DEBUG_UART_NONE)
  25. #error "A debug UART must be selected in the kernel config to use DEBUG_LL"
  26. #elif defined(CONFIG_TEGRA_DEBUG_UARTA)
  27. orr \rp, \rp, #0x6000
  28. orr \rv, \rv, #0x6000
  29. #elif defined(CONFIG_TEGRA_DEBUG_UARTB)
  30. orr \rp, \rp, #0x6000
  31. orr \rp, \rp, #0x40
  32. orr \rv, \rv, #0x6000
  33. orr \rv, \rv, #0x40
  34. #elif defined(CONFIG_TEGRA_DEBUG_UARTC)
  35. orr \rp, \rp, #0x6200
  36. orr \rv, \rv, #0x6200
  37. #elif defined(CONFIG_TEGRA_DEBUG_UARTD)
  38. orr \rp, \rp, #0x6300
  39. orr \rv, \rv, #0x6300
  40. #elif defined(CONFIG_TEGRA_DEBUG_UARTE)
  41. orr \rp, \rp, #0x6400
  42. orr \rv, \rv, #0x6400
  43. #endif
  44. .endm
  45. #define UART_SHIFT 2
  46. #include <asm/hardware/debug-8250.S>