mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 09:46:46 +07:00
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>
33 lines
712 B
ArmAsm
33 lines
712 B
ArmAsm
/*
|
|
* Copyright (C) 1994-1999 Russell King
|
|
* Copyright (C) 2008-2009 Telechips
|
|
* Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
*/
|
|
|
|
.macro addruart, rp, rv
|
|
moveq \rp, #0x90000000 @ physical base address
|
|
movne \rv, #0xF1000000 @ virtual base
|
|
orr \rp, \rp, #0x00007000 @ UART0
|
|
orr \rv, \rv, #0x00007000 @ UART0
|
|
.endm
|
|
|
|
.macro senduart,rd,rx
|
|
strb \rd, [\rx, #0x44]
|
|
.endm
|
|
|
|
.macro waituart,rd,rx
|
|
.endm
|
|
|
|
.macro busyuart,rd,rx
|
|
1001:
|
|
ldr \rd, [\rx, #0x14]
|
|
tst \rd, #0x20
|
|
|
|
beq 1001b
|
|
.endm
|