PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/arch/arm/mach-orion5x/include/mach/uncompress.h

https://github.com/AICP/kernel_asus_grouper
C Header | 49 lines | 28 code | 9 blank | 12 comment | 5 complexity | 54146800e6f21a4ebb909b2dd396801e MD5 | raw file
 1/*
 2 * arch/arm/mach-orion5x/include/mach/uncompress.h
 3 *
 4 * Tzachi Perelstein <tzachi@marvell.com>
 5 *
 6 * This file is licensed under the terms of the GNU General Public
 7 * License version 2.  This program is licensed "as is" without any
 8 * warranty of any kind, whether express or implied.
 9 */
10
11#include <linux/serial_reg.h>
12#include <mach/orion5x.h>
13
14#define SERIAL_BASE	((unsigned char *)UART0_PHYS_BASE)
15
16static void putc(const char c)
17{
18	unsigned char *base = SERIAL_BASE;
19	int i;
20
21	for (i = 0; i < 0x1000; i++) {
22		if (base[UART_LSR << 2] & UART_LSR_THRE)
23			break;
24		barrier();
25	}
26
27	base[UART_TX << 2] = c;
28}
29
30static void flush(void)
31{
32	unsigned char *base = SERIAL_BASE;
33	unsigned char mask;
34	int i;
35
36	mask = UART_LSR_TEMT | UART_LSR_THRE;
37
38	for (i = 0; i < 0x1000; i++) {
39		if ((base[UART_LSR << 2] & mask) == mask)
40			break;
41		barrier();
42	}
43}
44
45/*
46 * nothing to do
47 */
48#define arch_decomp_setup()
49#define arch_decomp_wdog()