diff options
author | John Crispin <john@openwrt.org> | 2013-04-25 19:03:13 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-04-25 19:03:13 +0000 |
commit | 46306c2e470063be7497c701511626791eccd6c0 (patch) | |
tree | 3b960af63722f03d519d042758fb1f2672cf5a0e /target/linux/lantiq/image/lzma-loader/src/board-lantiq.c | |
parent | fd79eb4e7c04b03d0301120c04311e54995e8d24 (diff) | |
download | master-31e0f0ae-46306c2e470063be7497c701511626791eccd6c0.tar.gz master-31e0f0ae-46306c2e470063be7497c701511626791eccd6c0.tar.bz2 master-31e0f0ae-46306c2e470063be7497c701511626791eccd6c0.zip |
lantiq: add lzma-loader source
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36438
Diffstat (limited to 'target/linux/lantiq/image/lzma-loader/src/board-lantiq.c')
-rw-r--r-- | target/linux/lantiq/image/lzma-loader/src/board-lantiq.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/lantiq/image/lzma-loader/src/board-lantiq.c b/target/linux/lantiq/image/lzma-loader/src/board-lantiq.c new file mode 100644 index 0000000000..b1b4373493 --- /dev/null +++ b/target/linux/lantiq/image/lzma-loader/src/board-lantiq.c @@ -0,0 +1,33 @@ +/* + * Arch specific code for Lantiq based boards + * + * Copyright (C) 2013 John Crispin <blogic@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> +#include "config.h" + +#define READREG(r) *(volatile unsigned int *)(r) +#define WRITEREG(r,v) *(volatile unsigned int *)(r) = v + +#define UART_BASE 0xbe100c00 +#define ASC_TBUF (UART_BASE | 0x20) +#define ASC_FSTAT (UART_BASE | 0x48) + +#define TXMASK 0x3F00 +#define TXOFFSET 8 + +void board_putc(char c) +{ + while ((READREG(ASC_FSTAT) & TXMASK) >> TXOFFSET); + + WRITEREG(ASC_TBUF, c); +} + +void board_init(void) +{ +} |