Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

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 <>
  • Loading branch information...
commit 2a1275cc191ff7b8fa44b031a9f52aff5718bb94 1 parent 6b812eb
@bootc bootc authored Dom Cobley committed
Showing with 5 additions and 7 deletions.
  1. +5 −7 arch/arm/mach-bcm2708/include/mach/debug-macro.S
12 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 <mach/platform.h>
+ .macro addruart, rp, rv
+ ldr \rp, =UART0_BASE
+ ldr \rv, =IO_ADDRESS(UART0_BASE)
#include <asm/hardware/debug-pl01x.S>
Please sign in to comment.
Something went wrong with that request. Please try again.