Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
a09e64fb | 2 | * arch/arm/mach-sa1100/include/mach/uncompress.h |
1da177e4 | 3 | * |
2f82af08 | 4 | * (C) 1999 Nicolas Pitre <nico@fluxnic.net> |
1da177e4 LT |
5 | * |
6 | * Reorganised to be machine independent. | |
7 | */ | |
8 | ||
9 | #include "hardware.h" | |
10 | ||
3169663a RK |
11 | #define IOMEM(x) (x) |
12 | ||
1da177e4 LT |
13 | /* |
14 | * The following code assumes the serial port has already been | |
15 | * initialized by the bootloader. We search for the first enabled | |
16 | * port in the most probable order. If you didn't setup a port in | |
17 | * your bootloader then nothing will appear (which might be desired). | |
18 | */ | |
19 | ||
20 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | |
21 | ||
a081568d | 22 | static void putc(int c) |
1da177e4 LT |
23 | { |
24 | unsigned long serial_port; | |
25 | ||
26 | do { | |
27 | serial_port = _Ser3UTCR0; | |
28 | if (UART(UTCR3) & UTCR3_TXE) break; | |
29 | serial_port = _Ser1UTCR0; | |
30 | if (UART(UTCR3) & UTCR3_TXE) break; | |
31 | serial_port = _Ser2UTCR0; | |
32 | if (UART(UTCR3) & UTCR3_TXE) break; | |
33 | return; | |
34 | } while (0); | |
35 | ||
a081568d RK |
36 | /* wait for space in the UART's transmitter */ |
37 | while (!(UART(UTSR1) & UTSR1_TNF)) | |
38 | barrier(); | |
1da177e4 | 39 | |
a081568d RK |
40 | /* send the character out. */ |
41 | UART(UTDR) = c; | |
42 | } | |
1da177e4 | 43 | |
a081568d RK |
44 | static inline void flush(void) |
45 | { | |
1da177e4 LT |
46 | } |
47 | ||
48 | /* | |
49 | * Nothing to do for these | |
50 | */ | |
51 | #define arch_decomp_setup() | |
52 | #define arch_decomp_wdog() |