Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 2 | /* |
| 3 | * arch/arm/mach-ebsa110/include/mach/uncompress.h |
| 4 | * |
| 5 | * Copyright (C) 1996,1997,1998 Russell King |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <linux/serial_reg.h> |
| 9 | |
| 10 | #define SERIAL_BASE ((unsigned char *)0xf0000be0) |
| 11 | |
| 12 | /* |
| 13 | * This does not append a newline |
| 14 | */ |
| 15 | static inline void putc(int c) |
| 16 | { |
| 17 | unsigned char v, *base = SERIAL_BASE; |
| 18 | |
| 19 | do { |
| 20 | v = base[UART_LSR << 2]; |
| 21 | barrier(); |
| 22 | } while (!(v & UART_LSR_THRE)); |
| 23 | |
| 24 | base[UART_TX << 2] = c; |
| 25 | } |
| 26 | |
| 27 | static inline void flush(void) |
| 28 | { |
| 29 | unsigned char v, *base = SERIAL_BASE; |
| 30 | |
| 31 | do { |
| 32 | v = base[UART_LSR << 2]; |
| 33 | barrier(); |
| 34 | } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) != |
| 35 | (UART_LSR_TEMT|UART_LSR_THRE)); |
| 36 | } |
| 37 | |
| 38 | /* |
| 39 | * nothing to do |
| 40 | */ |
| 41 | #define arch_decomp_setup() |