1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2010 John Crispin <john@phrozen.org>
8 #include <lantiq_soc.h>
12 #define LTQ_ASC_FSTAT ((u32 *)(LTQ_EARLY_ASC + 0x0048))
14 #define LTQ_ASC_TBUF ((u32 *)(LTQ_EARLY_ASC + 0x0020 + 3))
16 #define LTQ_ASC_TBUF ((u32 *)(LTQ_EARLY_ASC + 0x0020))
21 void prom_putchar(char c)
25 local_irq_save(flags);
26 do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET);
28 ltq_w8('\r', LTQ_ASC_TBUF);
29 ltq_w8(c, LTQ_ASC_TBUF);
30 local_irq_restore(flags);