File: /usr/src/linux/include/asm-arm/arch-sa1100/uncompress.h
1 /*
2 * linux/include/asm-arm/arch-brutus/uncompress.h
3 *
4 * (C) 1999 Nicolas Pitre <nico@cam.org>
5 *
6 * Reorganised to use machine_is_*() macros.
7 */
8
9 #include "hardware.h"
10
11 #include <asm/mach-types.h>
12
13 /* Assabet's Status Control "Register" */
14 unsigned long SCR_value;
15
16 /* sa1100_setup() will perform any special initialization for UART, etc. */
17 extern void sa1100_setup( int arch_id );
18 #define arch_decomp_setup() sa1100_setup(arch_id)
19
20 /*
21 * The following code assumes the serial port has already been
22 * initialized by the bootloader or such...
23 */
24
25 #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
26
27 static void puts( const char *s )
28 {
29 unsigned long serial_port;
30
31 if (machine_is_assabet()) {
32 if( machine_has_neponset() )
33 serial_port = _Ser3UTCR0;
34 else
35 serial_port = _Ser1UTCR0;
36 } else if (machine_is_brutus()||machine_is_nanoengine() ||
37 machine_is_pangolin() || machine_is_freebird() ||
38 machine_is_pfs168() || machine_is_flexanet())
39 serial_port = _Ser1UTCR0;
40 else if (machine_is_empeg() || machine_is_bitsy() ||
41 machine_is_victor() || machine_is_lart() ||
42 machine_is_sherman() || machine_is_yopy() ||
43 machine_is_huw_webpanel() || machine_is_itsy() )
44 serial_port = _Ser3UTCR0;
45 else
46 return;
47
48 for (; *s; s++) {
49 /* wait for space in the UART's transmiter */
50 while (!(UART(UTSR1) & UTSR1_TNF));
51
52 /* send the character out. */
53 UART(UTDR) = *s;
54
55 /* if a LF, also do CR... */
56 if (*s == 10) {
57 while (!(UART(UTSR1) & UTSR1_TNF));
58 UART(UTDR) = 13;
59 }
60 }
61 }
62
63 /*
64 * Nothing to do for these
65 */
66 #define arch_decomp_wdog()
67