Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112326
b: refs/heads/master
c: 92e88aa
h: refs/heads/master
v: v3
  • Loading branch information
Hartley Sweeten authored and Russell King committed Oct 3, 2008
1 parent 3398d86 commit a0171cc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 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: 7a1f3701183e2efb45e480517e29f6880e105f7b
refs/heads/master: 92e88aa7fb8190031dca9e04acbf4821bd77941b
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-ep93xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ config MACH_TS72XX
Say 'Y' here if you want your kernel to support the
Technologic Systems TS-72xx board.

choice
prompt "Select a UART for early kernel messages"

config EP93XX_EARLY_UART1
bool "UART1"

config EP93XX_EARLY_UART2
bool "UART2"

config EP93XX_EARLY_UART3
bool "UART3"

endchoice

endmenu

endif
21 changes: 15 additions & 6 deletions trunk/arch/arm/mach-ep93xx/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,31 @@ static void __raw_writel(unsigned int value, unsigned int ptr)
*((volatile unsigned int *)ptr) = value;
}


#define PHYS_UART1_DATA 0x808c0000
#define PHYS_UART1_FLAG 0x808c0018
#define UART1_FLAG_TXFF 0x20
#if defined(CONFIG_EP93XX_EARLY_UART1)
#define UART_BASE EP93XX_UART1_PHYS_BASE
#elif defined(CONFIG_EP93XX_EARLY_UART2)
#define UART_BASE EP93XX_UART2_PHYS_BASE
#elif defined(CONFIG_EP93XX_EARLY_UART3)
#define UART_BASE EP93XX_UART3_PHYS_BASE
#else
#define UART_BASE EP93XX_UART1_PHYS_BASE
#endif

#define PHYS_UART_DATA (UART_BASE + 0x00)
#define PHYS_UART_FLAG (UART_BASE + 0x18)
#define UART_FLAG_TXFF 0x20

static inline void putc(int c)
{
int i;

for (i = 0; i < 1000; i++) {
/* Transmit fifo not full? */
if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
break;
}

__raw_writeb(c, PHYS_UART1_DATA);
__raw_writeb(c, PHYS_UART_DATA);
}

static inline void flush(void)
Expand Down

0 comments on commit a0171cc

Please sign in to comment.