Linux 5.7.7
[linux/fpc-iii.git] / arch / arm / mach-ixp4xx / include / mach / uncompress.h
blob9e08b270cfc703f14b5a9ecbc544b76beff049e8
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * arch/arm/mach-ixp4xx/include/mach/uncompress.h
5 * Copyright (C) 2002 Intel Corporation.
6 * Copyright (C) 2003-2004 MontaVista Software, Inc.
7 */
9 #ifndef _ARCH_UNCOMPRESS_H_
10 #define _ARCH_UNCOMPRESS_H_
12 #include "ixp4xx-regs.h"
13 #include <asm/mach-types.h>
14 #include <linux/serial_reg.h>
16 #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
18 volatile u32* uart_base;
20 static inline void putc(int c)
22 /* Check THRE and TEMT bits before we transmit the character.
24 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
25 barrier();
27 *uart_base = c;
30 static void flush(void)
34 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
37 * Some boards are using UART2 as console
39 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
40 machine_is_gateway7001() || machine_is_wg302v2() ||
41 machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
42 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
43 else
44 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
48 * arch_id is a variable in decompress_kernel()
50 #define arch_decomp_setup() __arch_decomp_setup(arch_id)
52 #endif