mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
53 lines
1.1 KiB
C
53 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* arch/arm/mach-ixp4xx/include/mach/uncompress.h
|
|
*
|
|
* Copyright (C) 2002 Intel Corporation.
|
|
* Copyright (C) 2003-2004 MontaVista Software, Inc.
|
|
*/
|
|
|
|
#ifndef _ARCH_UNCOMPRESS_H_
|
|
#define _ARCH_UNCOMPRESS_H_
|
|
|
|
#include "ixp4xx-regs.h"
|
|
#include <asm/mach-types.h>
|
|
#include <linux/serial_reg.h>
|
|
|
|
#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
|
|
|
|
volatile u32* uart_base;
|
|
|
|
static inline void putc(int c)
|
|
{
|
|
/* Check THRE and TEMT bits before we transmit the character.
|
|
*/
|
|
while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
|
|
barrier();
|
|
|
|
*uart_base = c;
|
|
}
|
|
|
|
static void flush(void)
|
|
{
|
|
}
|
|
|
|
static __inline__ void __arch_decomp_setup(unsigned long arch_id)
|
|
{
|
|
/*
|
|
* Some boards are using UART2 as console
|
|
*/
|
|
if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
|
|
machine_is_gateway7001() || machine_is_wg302v2() ||
|
|
machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
|
|
uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
|
|
else
|
|
uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
|
|
}
|
|
|
|
/*
|
|
* arch_id is a variable in decompress_kernel()
|
|
*/
|
|
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
|
|
|
|
#endif
|