Import changeset
[linux-flexiantxendom0-3.2.10.git] / 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 #include "serial_reg.h"
11
12 #include <asm/mach-types.h>
13
14 /* Assabet's Status Control "Register" */
15 unsigned long SCR_value;
16
17 /* sa1100_setup() will perform any special initialization for UART, etc. */
18 extern void sa1100_setup( int arch_id );
19 #define arch_decomp_setup()     sa1100_setup(arch_id)
20
21 /*
22  * The following code assumes the serial port has already been
23  * initialized by the bootloader or such...
24  */
25 static void puts( const char *s )
26 {
27         volatile unsigned long *serial_port;
28
29         if (machine_is_assabet()) {
30                 if( machine_has_neponset() )
31                         serial_port = (unsigned long *)_Ser3UTCR0;
32                 else
33                         serial_port = (unsigned long *)_Ser1UTCR0;
34         } else if (machine_is_brutus()||machine_is_nanoengine())
35                 serial_port = (unsigned long *)_Ser1UTCR0;
36         else if (machine_is_empeg() || machine_is_bitsy() ||
37                  machine_is_victor() || machine_is_lart())
38                 serial_port = (unsigned long *)_Ser3UTCR0;
39         else
40                 return;
41
42         for (; *s; s++) {
43                 /* wait for space in the UART's transmiter */
44                 while (!(serial_port[UTSR1] & UTSR1_TNF));
45
46                 /* send the character out. */
47                 serial_port[UART_TX] = *s;
48
49                 /* if a LF, also do CR... */
50                 if (*s == 10) {
51                         while (!(serial_port[UTSR1] & UTSR1_TNF));
52                         serial_port[UART_TX] = 13;
53                 }
54         }
55 }
56
57 /*
58  * Nothing to do for these
59  */
60 #define arch_decomp_wdog()