0ea1293009
Rather than checking the MMU status in every instance of addruart, do it once in kernel/debug.S, and change the existing addruart macros to return both physical and virtual addresses. The main debug code can then select the appropriate address to use. This will also allow us to retreive the address of a uart for the MMU state that we're not current in. Updated with fixes for OMAP from Jason Wang <jason77.wang@gmail.com> and Tony Lindgren <tony@atomide.com>, and fix for versatile express from Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Jason Wang <jason77.wang@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
43 lines
1008 B
ArmAsm
43 lines
1008 B
ArmAsm
/* arch/arm/mach-msm7200/include/mach/debug-macro.S
|
|
*
|
|
* Copyright (C) 2007 Google, Inc.
|
|
* Author: Brian Swetland <swetland@google.com>
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
#include <mach/hardware.h>
|
|
#include <mach/msm_iomap.h>
|
|
|
|
#ifdef CONFIG_HAS_MSM_DEBUG_UART_PHYS
|
|
.macro addruart, rp, rv
|
|
ldr \rp, =MSM_DEBUG_UART_PHYS
|
|
ldr \rv, =MSM_DEBUG_UART_BASE
|
|
.endm
|
|
|
|
.macro senduart,rd,rx
|
|
teq \rx, #0
|
|
strne \rd, [\rx, #0x0C]
|
|
.endm
|
|
|
|
.macro waituart,rd,rx
|
|
@ wait for TX_READY
|
|
1001: ldr \rd, [\rx, #0x08]
|
|
tst \rd, #0x04
|
|
beq 1001b
|
|
.endm
|
|
|
|
.macro busyuart,rd,rx
|
|
.endm
|
|
#endif
|