OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> |
||
3 | * |
||
4 | * This program is free software; you can redistribute it and/or modify |
||
5 | * it under the terms of the GNU General Public License version 2 as |
||
6 | * published by the Free Software Foundation. |
||
7 | */ |
||
8 | |||
9 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
||
10 | #define __ASM_ARCH_UNCOMPRESS_H |
||
11 | |||
12 | #include <linux/serial_reg.h> |
||
13 | #include <asm/io.h> |
||
14 | #include <mach/mcs814x.h> |
||
15 | #include <mach/cpu.h> |
||
16 | |||
17 | #define UART_SHIFT (2) |
||
18 | |||
19 | /* cannot be static because the code will be inlined */ |
||
20 | void __iomem *uart_base; |
||
21 | |||
22 | static inline void putc(int c) |
||
23 | { |
||
24 | while (!(__raw_readb(uart_base + (UART_LSR << UART_SHIFT)) & UART_LSR_TEMT)); |
||
25 | __raw_writeb(c, uart_base + (UART_TX << UART_SHIFT)); |
||
26 | } |
||
27 | |||
28 | static inline void flush(void) |
||
29 | { |
||
30 | } |
||
31 | |||
32 | static inline void arch_decomp_setup(void) |
||
33 | { |
||
34 | if (soc_is_mcs8140()) |
||
35 | uart_base = (void __iomem *)(MCS814X_PHYS_BASE +MCS814X_UART); |
||
36 | } |
||
37 | |||
38 | #define arch_decomp_wdog() |
||
39 | |||
40 | #endif |