Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 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 | |
| 21 | #include <mach/io.h> |
| 22 | |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 23 | .macro addruart, rp, rv |
| 24 | ldreq \rp, =IO_APB_PHYS @ physical |
| 25 | ldrne \rv, =IO_APB_VIRT @ virtual |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 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) |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 29 | orr \rp, \rp, #0x6000 |
| 30 | orr \rv, \rv, #0x6000 |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 31 | #elif defined(CONFIG_TEGRA_DEBUG_UARTB) |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 32 | orr \rp, \rp, #0x6000 |
| 33 | orr \rp, \rp, #0x40 |
| 34 | orr \rv, \rv, #0x6000 |
| 35 | orr \rv, \rv, #0x40 |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 36 | #elif defined(CONFIG_TEGRA_DEBUG_UARTC) |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 37 | orr \rp, \rp, #0x6200 |
| 38 | orr \rv, \rv, #0x6200 |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 39 | #elif defined(CONFIG_TEGRA_DEBUG_UARTD) |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 40 | orr \rp, \rp, #0x6300 |
| 41 | orr \rv, \rv, #0x6300 |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 42 | #elif defined(CONFIG_TEGRA_DEBUG_UARTE) |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 43 | orr \rp, \rp, #0x6400 |
| 44 | orr \rv, \rv, #0x6400 |
Erik Gilling | c5f8006 | 2010-01-21 16:53:02 -0800 | [diff] [blame] | 45 | #endif |
| 46 | .endm |
| 47 | |
| 48 | #define UART_SHIFT 2 |
| 49 | #include <asm/hardware/debug-8250.S> |
| 50 | |