blob: 0533abace72dfd266bc5dc31a3335e0a42f8aaf4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* LZMA compressed kernel loader for Realtek 819X
*
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#include <stddef.h>
#define UART_THR 0xb8002000
#define UART_LSR 0xb8002014
#define REG32(reg) (*(volatile unsigned int *)((unsigned int)reg))
void serial_outc(char c)
{
int i=0;
while (1)
{
i++;
if (i >=0x6000)
break;
if (REG32(UART_LSR) & 0x20000000)
break;
}
REG32(UART_THR) = (c << 24);
}
void board_putc(int ch)
{
serial_outc(ch);
}
void board_init(void)
{
}
|