summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-ep93xx/uncompress.h
blob: 4410d217077e04c743b7c6857fe2bef26bf49510 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * linux/include/asm-arm/arch-ep93xx/uncompress.h
 *
 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 */

#include <asm/arch/ep93xx-regs.h>

static unsigned char __raw_readb(unsigned int ptr)
{
	return *((volatile unsigned char *)ptr);
}

static void __raw_writeb(unsigned char value, unsigned int ptr)
{
	*((volatile unsigned char *)ptr) = value;
}


#define PHYS_UART1_DATA		0x808c0000
#define PHYS_UART1_FLAG		0x808c0018
#define UART1_FLAG_TXFF		0x20

static __inline__ void putc(char c)
{
	int i;

	for (i = 0; i < 1000; i++) {
		/* Transmit fifo not full?  */
		if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
			break;
	}

	__raw_writeb(c, PHYS_UART1_DATA);
}

static void putstr(const char *s)
{
	while (*s) {
		putc(*s);
		if (*s == '\n')
			putc('\r');
		s++;
	}
}

#define arch_decomp_setup()
#define arch_decomp_wdog()
OpenPOWER on IntegriCloud