Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100745
b: refs/heads/master
c: 0e3bc05
h: refs/heads/master
i:
  100743: c2ce3e6
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Jun 22, 2008
1 parent 4b8a4bb commit e301c35
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 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: 7ec753ccc10ad552c8ec2d40e0edbe3a9c562f30
refs/heads/master: 0e3bc0503f7e7b5b0bd4416f43eeeca1b661e66e
29 changes: 22 additions & 7 deletions trunk/include/asm-arm/arch-orion5x/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,38 @@
* warranty of any kind, whether express or implied.
*/

#include <linux/serial_reg.h>
#include <asm/arch/orion5x.h>

#define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
#define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))

#define LSR_THRE 0x20
#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)

static void putc(const char c)
{
int j = 0x1000;
while (--j && !(*MV_UART_LSR & LSR_THRE))
unsigned char *base = SERIAL_BASE;
int i;

for (i = 0; i < 0x1000; i++) {
if (base[UART_LSR << 2] & UART_LSR_THRE)
break;
barrier();
*MV_UART_THR = c;
}

base[UART_TX << 2] = c;
}

static void flush(void)
{
unsigned char *base = SERIAL_BASE;
unsigned char mask;
int i;

mask = UART_LSR_TEMT | UART_LSR_THRE;

for (i = 0; i < 0x1000; i++) {
if ((base[UART_LSR << 2] & mask) == mask)
break;
barrier();
}
}

/*
Expand Down

0 comments on commit e301c35

Please sign in to comment.