2 * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org>
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.
9 #ifndef __ASM_ARCH_UNCOMPRESS_H
10 #define __ASM_ARCH_UNCOMPRESS_H
12 #include <linux/serial_reg.h>
14 #include <mach/mcs814x.h>
17 #define UART_SHIFT (2)
19 /* cannot be static because the code will be inlined */
20 void __iomem
*uart_base
;
22 static inline void putc(int c
)
24 while (!(__raw_readb(uart_base
+ (UART_LSR
<< UART_SHIFT
)) & UART_LSR_TEMT
));
25 __raw_writeb(c
, uart_base
+ (UART_TX
<< UART_SHIFT
));
28 static inline void flush(void)
32 static inline void arch_decomp_setup(void)
35 uart_base
= (void __iomem
*)(MCS814X_PHYS_BASE
+MCS814X_UART
);
38 #define arch_decomp_wdog()