18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * arch/arm/plat-spear/include/plat/uncompress.h
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Serial port stubs for kernel decompress status messages
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 2009 ST Microelectronics
78c2ecf20Sopenharmony_ci * Viresh Kumar <vireshk@kernel.org>
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public
108c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any
118c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied.
128c2ecf20Sopenharmony_ci */
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/io.h>
158c2ecf20Sopenharmony_ci#include <linux/amba/serial.h>
168c2ecf20Sopenharmony_ci#include <mach/spear.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#ifndef __PLAT_UNCOMPRESS_H
198c2ecf20Sopenharmony_ci#define __PLAT_UNCOMPRESS_H
208c2ecf20Sopenharmony_ci/*
218c2ecf20Sopenharmony_ci * This does not append a newline
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_cistatic inline void putc(int c)
248c2ecf20Sopenharmony_ci{
258c2ecf20Sopenharmony_ci	void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci	while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
288c2ecf20Sopenharmony_ci		barrier();
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci	writel_relaxed(c, base + UART01x_DR);
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistatic inline void flush(void)
348c2ecf20Sopenharmony_ci{
358c2ecf20Sopenharmony_ci}
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/*
388c2ecf20Sopenharmony_ci * nothing to do
398c2ecf20Sopenharmony_ci */
408c2ecf20Sopenharmony_ci#define arch_decomp_setup()
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#endif /* __PLAT_UNCOMPRESS_H */
43