Re: 4430SDP boot failure

Russell King - ARM Linux
2011-01-07T16:12:38Z

On Thu, Jan 06, 2011 at 12:40:54PM -0800, Tony Lindgren wrote:
> Anyways, I can debug the DEBUG_LL booting issue further if the patch
> I posted does not help.

This is what I ended up with earlier today to make the debug code work
both in the decompressor and in the kernel - once I had it working I
haven't bothered putting any more effort into it.

diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index 6a4d413..47df8a6 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -13,6 +13,7 @@

#include <linux/serial_reg.h>

+#if 0
#include <asm/memory.h>

#include <plat/serial.h>
@@ -139,6 +140,24 @@ omap_uart_lsr: .word 0
teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
bne 1001b
.endm
+#else
+ .macro addruart, rp, rv
+ mov \rp, #0x00020000
+ orr \rv, \rp, #0xfa000000
+ orr \rp, \rp, #0x48000000
+ .endm
+
+ .macro senduart, ch, rb
+ strb \ch, [\rb]
+ .endm
+
+ .macro busyuart, rb, tmp
+1001: ldrb \tmp, [\rb, #UART_LSR << 2]
+ and \tmp, \tmp, #UART_LSR_TEMT | UART_LSR_THRE
+ teq \tmp, #UART_LSR_TEMT | UART_LSR_THRE
+ bne 1001b
+ .endm
+#endif

.macro waituart,rd,rx
.endm