From e6132dffdc471125ec2f9074559c40b5103f87dc Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Mon, 7 May 2012 11:21:15 +0100 Subject: [PATCH] mach-bcm2708: fix mach/debug-macro.S so that early printk works Not sure what the original code was trying to do as it was completely wrong on many levels. This patch fixes the macro to return the correct physical and virtual addresses of the PL011 UART on the RPi. Note that you need to boot the compressed kernel (zImage) so that the UART is configured at boot, or your kernel will hang when it tries to access the UART. Signed-off-by: Chris Boot --- arch/arm/mach-bcm2708/include/mach/debug-macro.S | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-bcm2708/include/mach/debug-macro.S b/arch/arm/mach-bcm2708/include/mach/debug-macro.S index 8abbf32ded1ed8..88229d8253c742 100644 --- a/arch/arm/mach-bcm2708/include/mach/debug-macro.S +++ b/arch/arm/mach-bcm2708/include/mach/debug-macro.S @@ -12,13 +12,11 @@ * */ - .macro addruart, rx, tmp - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - moveq \rx, #0x08000000 - movne \rx, #0xf8000000 @ virtual base - orr \rx, \rx, #0x00200000 - orr \rx, \rx, #0x00001000 +#include + + .macro addruart, rp, rv + ldr \rp, =UART0_BASE + ldr \rv, =IO_ADDRESS(UART0_BASE) .endm #include