summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-sa1100/uncompress.h
blob: 33ced71ba995a6d3f87e7290f3222b124cd00733 (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
54
55
56
57
58
59
/*
 * linux/include/asm-arm/arch-brutus/uncompress.h
 *
 * (C) 1999 Nicolas Pitre <nico@cam.org>
 */

#include <linux/config.h>

#if	defined(CONFIG_SA1100_EMPEG) || \
	defined(CONFIG_SA1100_VICTOR) || \
	defined(CONFIG_SA1100_LART)
#define SERBASE _Ser3UTCR0;
#elif	defined(CONFIG_SA1100_BRUTUS)
#define SERBASE _Ser1UTCR0;
#endif


#ifdef SERBASE

#include "hardware.h"
#include "serial_reg.h"

static volatile unsigned long* serial_port = (unsigned long*)SERBASE;

/*
 * The following code assumes the serial port has already been
 * initialized by the bootloader or such...
 */

static void puts( const char *s )
{
    int i;

    for (i = 0; *s; i++, s++) {
	/* wait for space in the UART's transmiter */
	while( !(serial_port[UTSR1] & UTSR1_TNF) );

	/* send the character out. */
	serial_port[UART_TX] = *s;

	/* if a LF, also do CR... */
	if (*s == 10) {
	    while( !(serial_port[UTSR1] & UTSR1_TNF) );
	    serial_port[UART_TX] = 13;
	}
    }
}

#else

static inline void puts( const char *s ) {}

#endif


/* Nothing to do for these */
#define arch_decomp_setup()
#define arch_decomp_wdog()