mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 06:41:43 +00: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>
32 lines
685 B
C
32 lines
685 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
*
|
|
* Copyright (C) 2010 John Crispin <john@phrozen.org>
|
|
*/
|
|
|
|
#include <linux/cpu.h>
|
|
#include <lantiq_soc.h>
|
|
#include <asm/setup.h>
|
|
|
|
#define ASC_BUF 1024
|
|
#define LTQ_ASC_FSTAT ((u32 *)(LTQ_EARLY_ASC + 0x0048))
|
|
#ifdef __BIG_ENDIAN
|
|
#define LTQ_ASC_TBUF ((u32 *)(LTQ_EARLY_ASC + 0x0020 + 3))
|
|
#else
|
|
#define LTQ_ASC_TBUF ((u32 *)(LTQ_EARLY_ASC + 0x0020))
|
|
#endif
|
|
#define TXMASK 0x3F00
|
|
#define TXOFFSET 8
|
|
|
|
void prom_putchar(char c)
|
|
{
|
|
unsigned long flags;
|
|
|
|
local_irq_save(flags);
|
|
do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET);
|
|
if (c == '\n')
|
|
ltq_w8('\r', LTQ_ASC_TBUF);
|
|
ltq_w8(c, LTQ_ASC_TBUF);
|
|
local_irq_restore(flags);
|
|
}
|