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