lantiq: rework VG3503J image
[openwrt/openwrt.git] / target / linux / lantiq / image / lzma-loader / src / board-lantiq.c
1 /*
2 * Arch specific code for Lantiq based boards
3 *
4 * Copyright (C) 2013 John Crispin <blogic@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10
11 #include <stddef.h>
12 #include "config.h"
13
14 #define READREG(r) *(volatile unsigned int *)(r)
15 #define WRITEREG(r,v) *(volatile unsigned int *)(r) = v
16
17 #define UART_BASE 0xbe100c00
18 #define ASC_TBUF (UART_BASE | 0x20)
19 #define ASC_FSTAT (UART_BASE | 0x48)
20
21 #define TXMASK 0x3F00
22 #define TXOFFSET 8
23
24 void board_putc(char c)
25 {
26 while ((READREG(ASC_FSTAT) & TXMASK) >> TXOFFSET);
27
28 WRITEREG(ASC_TBUF, c);
29 }
30
31 void board_init(void)
32 {
33 }