1 /* SPDX-License-Identifier: GPL-2.0 */
3 * arch/arm/mach-sa1100/include/mach/uncompress.h
5 * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
7 * Reorganised to be machine independent.
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;
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;
37 /* wait for space in the UART's transmitter */
38 while (!(UART(UTSR1) & UTSR1_TNF))
41 /* send the character out. */
45 static inline void flush(void)
50 * Nothing to do for these
52 #define arch_decomp_setup()