1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * arch/arm/mach-sa1100/include/mach/uncompress.h 4 * 5 * (C) 1999 Nicolas Pitre <nico@fluxnic.net> 6 * 7 * Reorganised to be machine independent. 8 */ 9 10 #include "hardware.h" 11 12 #define IOMEM(x) (x) 13 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 23 static inline void putc(int c) 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 37 /* wait for space in the UART's transmitter */ 38 while (!(UART(UTSR1) & UTSR1_TNF)) 39 barrier(); 40 41 /* send the character out. */ 42 UART(UTDR) = c; 43 } 44 45 static inline void flush(void) 46 { 47 } 48 49 /* 50 * Nothing to do for these 51 */ 52 #define arch_decomp_setup() 53
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.