Linux 5.7.6
[linux/fpc-iii.git] / arch / arm / mach-sa1100 / include / mach / uncompress.h
blobf5eaa90a4576e574ea54468e844663e9a58ec033
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * arch/arm/mach-sa1100/include/mach/uncompress.h
5 * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
7 * Reorganised to be machine independent.
8 */
10 #include "hardware.h"
12 #define IOMEM(x) (x)
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).
21 #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
23 static inline void putc(int c)
25 unsigned long serial_port;
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);
37 /* wait for space in the UART's transmitter */
38 while (!(UART(UTSR1) & UTSR1_TNF))
39 barrier();
41 /* send the character out. */
42 UART(UTDR) = c;
45 static inline void flush(void)
50 * Nothing to do for these
52 #define arch_decomp_setup()