Skip to content

Commit

Permalink
mach-bcm2708: fix mach/debug-macro.S so that early printk works
Browse files Browse the repository at this point in the history
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 <bootc@bootc.net>
  • Loading branch information
bootc committed May 21, 2012
1 parent e5f4f74 commit e6132df
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions arch/arm/mach-bcm2708/include/mach/debug-macro.S
Expand Up @@ -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)
.endm

#include <asm/hardware/debug-pl01x.S>

0 comments on commit e6132df

Please sign in to comment.