import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / uncompress.h
1 #ifndef __MT_UNCOMPRESS_H
2 #define __MT_UNCOMPRESS_H
3
4 #include <asm/mach/arch.h>
5 #include <asm/mach/time.h>
6 #include <asm/mach/map.h>
7 #include <asm/mach-types.h>
8 #include <asm/page.h>
9 #include "mt_reg_base.h"
10
11 #define MT_UART_PHY_BASE IO_VIRT_TO_PHYS(UART1_BASE)
12
13 #define MT_UART_LSR *(volatile unsigned char *)(MT_UART_PHY_BASE+0x14)
14 #define MT_UART_THR *(volatile unsigned char *)(MT_UART_PHY_BASE+0x0)
15 #define MT_UART_LCR *(volatile unsigned char *)(MT_UART_PHY_BASE+0xc)
16 #define MT_UART_DLL *(volatile unsigned char *)(MT_UART_PHY_BASE+0x0)
17 #define MT_UART_DLH *(volatile unsigned char *)(MT_UART_PHY_BASE+0x4)
18 #define MT_UART_FCR *(volatile unsigned char *)(MT_UART_PHY_BASE+0x8)
19 #define MT_UART_MCR *(volatile unsigned char *)(MT_UART_PHY_BASE+0x10)
20 #define MT_UART_SPEED *(volatile unsigned char *)(MT_UART_PHY_BASE+0x24)
21
22
23 static void arch_decomp_setup(void)
24 {
25 unsigned char tmp;
26
27 #if defined(CONFIG_MT_FPGA)
28 MT_UART_LCR = 0x3;
29 tmp = MT_UART_LCR;
30 MT_UART_LCR = (tmp | 0x80);
31 MT_UART_SPEED = 0x0;
32 MT_UART_DLL = 0x0E;
33 MT_UART_DLH = 0;
34 MT_UART_LCR = tmp;
35 MT_UART_FCR = 0x0047;
36 MT_UART_MCR = (0x1 | 0x2);
37 #endif
38 }
39
40 /*
41 * This does not append a newline
42 */
43 static inline void putc(int c)
44 {
45 while (!(MT_UART_LSR & 0x20));
46 MT_UART_THR = c;
47 }
48
49 static inline void flush(void)
50 {
51 }
52
53 /*
54 * nothing to do
55 */
56 #define arch_decomp_wdog()
57
58 #endif
59