summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-sa1100/uncompress.h
blob: 5f4648ee61226f537de193e2a968d9c5c0a2221e (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
60
/*
 * linux/include/asm-arm/arch-brutus/uncompress.h
 *
 * (C) 1999 Nicolas Pitre <nico@cam.org>
 *
 * Reorganised to use machine_is_*() macros.
 */

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

#include <asm/mach-types.h>

/* Assabet's Status Control "Register" */
unsigned long SCR_value;

/* sa1100_setup() will perform any special initialization for UART, etc. */
extern void sa1100_setup( int arch_id );
#define arch_decomp_setup()	sa1100_setup(arch_id)

/*
 * The following code assumes the serial port has already been
 * initialized by the bootloader or such...
 */
static void puts( const char *s )
{
	volatile unsigned long *serial_port;

	if (machine_is_assabet()) {
		if( machine_has_neponset() )
			serial_port = (unsigned long *)_Ser3UTCR0;
		else
			serial_port = (unsigned long *)_Ser1UTCR0;
	} else if (machine_is_brutus()||machine_is_nanoengine())
		serial_port = (unsigned long *)_Ser1UTCR0;
	else if (machine_is_empeg() || machine_is_bitsy() ||
		 machine_is_victor() || machine_is_lart())
		serial_port = (unsigned long *)_Ser3UTCR0;
	else
		return;

	for (; *s; 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;
		}
	}
}

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