Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270175
b: refs/heads/master
c: dd18545
h: refs/heads/master
i:
  270173: 7c7f7d2
  270171: 0090f42
  270167: a660538
  270159: 310d5ab
  270143: 751ef2c
v: v3
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Sep 26, 2011
1 parent 02beae6 commit d05d214
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 639da5ee374ba8f070690bbd355ca30139ce145a
refs/heads/master: dd185456efce7f326c058fc12fd0df17bd8466eb
8 changes: 3 additions & 5 deletions trunk/arch/arm/mach-omap1/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ omap_uart_virt: .word 0x0
bne 99f @ already configured

/* Check the debug UART configuration set in uncompress.h */
mrc p15, 0, \rp, c1, c0
tst \rp, #1 @ MMU enabled?
ldreq \rp, =OMAP_UART_INFO @ MMU not enabled
ldrne \rp, =omap_uart_p2v(OMAP_UART_INFO) @ MMU enabled
ldr \rp, [\rp, #0]
and \rp, pc, #0xff000000
ldr \rv, =OMAP_UART_INFO_OFS
ldr \rp, [\rp, \rv]

/* Select the UART to use based on the UART1 scratchpad value */
10: cmp \rp, #0 @ no port configured?
Expand Down
9 changes: 4 additions & 5 deletions trunk/arch/arm/mach-omap2/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ omap_uart_lsr: .word 0
bne 99f @ already configured

/* Check the debug UART configuration set in uncompress.h */
mrc p15, 0, \rp, c1, c0
tst \rp, #1 @ MMU enabled?
ldreq \rp, =OMAP_UART_INFO @ MMU not enabled
ldrne \rp, =omap_uart_p2v(OMAP_UART_INFO) @ MMU enabled
ldr \rp, [\rp, #0]
mov \rp, pc
ldr \rv, =OMAP_UART_INFO_OFS
and \rp, \rp, #0xff000000
ldr \rp, [\rp, \rv]

/* Select the UART to use based on the UART1 scratchpad value */
cmp \rp, #0 @ no port configured?
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/plat-omap/include/plat/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <linux/init.h>

/*
* Memory entry used for the DEBUG_LL UART configuration. See also
* uncompress.h and debug-macro.S.
* Memory entry used for the DEBUG_LL UART configuration, relative to
* start of RAM. See also uncompress.h and debug-macro.S.
*
* Note that using a memory location for storing the UART configuration
* has at least two limitations:
Expand All @@ -27,7 +27,7 @@
* 2. We assume printascii is called at least once before paging_init,
* and addruart has a chance to read OMAP_UART_INFO
*/
#define OMAP_UART_INFO (PLAT_PHYS_OFFSET + 0x3ffc)
#define OMAP_UART_INFO_OFS 0x3ffc

/* OMAP1 serial ports */
#define OMAP1_UART1_BASE 0xfffb0000
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/plat-omap/include/plat/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ int uart_shift;
*/
static void set_omap_uart_info(unsigned char port)
{
*(volatile u32 *)OMAP_UART_INFO = port;
/*
* Get address of some.bss variable and round it down
* a la CONFIG_AUTO_ZRELADDR.
*/
u32 ram_start = (u32)&uart_shift & 0xf8000000;
u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS);
*uart_info = port;
}

static void putc(int c)
Expand Down

0 comments on commit d05d214

Please sign in to comment.