aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-04-30 20:39:19 -0400
committerTony Lindgren <tony@atomide.com>2010-05-03 20:53:08 -0400
commit96554d70775e936e870f61d9523c9bab3fd54ad6 (patch)
tree7a3c8f4b40d5753de274226cf7829bbbc9d0eb14 /arch/arm/mach-omap1
parentdaa494958a59638f32b4334155e4c3e1f664c675 (diff)
omap: Use a memory address for storing the debug port info instead of UART1 scratchpad
This removes the dependency to the UART1 being available for storing the debug configuration in uncompress.h. This will simplify the DEBUG_LL UART configuration for boards that may not have UART1, or have an external UART as it requires only one mapping for DEBUG_LL. The patch has a few limitations. Basically now we're assuming that the kernel uncompress code won't overlap with OMAP_UART_INFO. We also assume the printascii is called at least once before paging_init in order for addruart to have a chance to read the UART setup from OMAP_UART_INFO. As suggested by Cyril Chemparathy <cyril@ti.com>, Vikram Pandita <vikram.pandita@ti.com> and Kevin Hilman <khilman@deeprootsystems.com>. Based on an earlier patch posted for Davinci by Cyril Chemparathy <cyril@ti.com>. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/include/mach/debug-macro.S21
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S
index b6d9584544b4..e8a8cf36b7f0 100644
--- a/arch/arm/mach-omap1/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap1/include/mach/debug-macro.S
@@ -13,6 +13,8 @@
13 13
14#include <linux/serial_reg.h> 14#include <linux/serial_reg.h>
15 15
16#include <asm/memory.h>
17
16#include <plat/serial.h> 18#include <plat/serial.h>
17 19
18 .pushsection .data 20 .pushsection .data
@@ -37,23 +39,12 @@ omap_uart_virt: .word 0x0
37 cmp \rx, #0 @ is port configured? 39 cmp \rx, #0 @ is port configured?
38 bne 99f @ already configured 40 bne 99f @ already configured
39 41
40 /* Check 7XX UART1 scratchpad register for uart to use */ 42 /* Check the debug UART configuration set in uncompress.h */
41 mrc p15, 0, \rx, c1, c0 43 mrc p15, 0, \rx, c1, c0
42 tst \rx, #1 @ MMU enabled? 44 tst \rx, #1 @ MMU enabled?
43 moveq \rx, #0xff000000 @ physical base address 45 ldreq \rx, =OMAP_UART_INFO
44 movne \rx, #0xfe000000 @ virtual base 46 ldrne \rx, =__phys_to_virt(OMAP_UART_INFO)
45 orr \rx, \rx, #0x00fb0000 @ OMAP1UART1 47 ldr \rx, [\rx, #0]
46 ldrb \rx, [\rx, #(UART_SCR << OMAP7XX_PORT_SHIFT)]
47 cmp \rx, #0 @ anything in 7XX scratchpad?
48 bne 10f @ found 7XX uart
49
50 /* Check 15xx/16xx UART1 scratchpad register for uart to use */
51 mrc p15, 0, \rx, c1, c0
52 tst \rx, #1 @ MMU enabled?
53 moveq \rx, #0xff000000 @ physical base address
54 movne \rx, #0xfe000000 @ virtual base
55 orr \rx, \rx, #0x00fb0000 @ OMAP1UART1
56 ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)]
57 48
58 /* Select the UART to use based on the UART1 scratchpad value */ 49 /* Select the UART to use based on the UART1 scratchpad value */
5910: cmp \rx, #0 @ no port configured? 5010: cmp \rx, #0 @ no port configured?