summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-aspeed/include/mach/uncompress.h
blob: 3be04b06e16d96f82e913739c19811e88511370c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 *  uncompress.h
 *
 *  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.
 */

#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H

#include <mach/platform.h>
#include <mach/aspeed_serial.h>

#define UART_PUT_CHAR   (*(volatile unsigned char *)(AST_UART_BASE + UART_THR))
#define UART_GET_LSR   (*(volatile unsigned char *)(AST_UART_BASE + UART_LSR))

static void putc(int c)
{

	/* wait for space in the UART's transmitter */
	while (!(UART_GET_LSR & UART_LSR_THRE))
		barrier();

	/* send the character out. */
	UART_PUT_CHAR = c;
}

static inline void flush(void)
{
	while (UART_GET_LSR & (1 << 3))
			 barrier();
}

#define arch_decomp_setup()
#define arch_decomp_wdog()

#endif /* __ASM_ARCH_UNCOMPRESS_H */
OpenPOWER on IntegriCloud