blob: 8439b9c12edb616834a6eeb74274e22e7d02ed04 [file] [log] [blame]
viresh kumarbf976b52010-04-01 12:30:42 +01001/*
2 * arch/arm/plat-spear/include/plat/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Copyright (C) 2009 ST Microelectronics
Viresh Kumarda899472015-07-17 16:23:50 -07007 * Viresh Kumar <vireshk@kernel.org>
viresh kumarbf976b52010-04-01 12:30:42 +01008 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#include <linux/io.h>
15#include <linux/amba/serial.h>
Arnd Bergmann5019f0b2012-04-11 17:30:11 +000016#include <mach/spear.h>
viresh kumarbf976b52010-04-01 12:30:42 +010017
18#ifndef __PLAT_UNCOMPRESS_H
19#define __PLAT_UNCOMPRESS_H
20/*
21 * This does not append a newline
22 */
23static inline void putc(int c)
24{
25 void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
26
viresh kumarac1556b2011-02-16 07:41:06 +010027 while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
viresh kumarbf976b52010-04-01 12:30:42 +010028 barrier();
29
viresh kumarac1556b2011-02-16 07:41:06 +010030 writel_relaxed(c, base + UART01x_DR);
viresh kumarbf976b52010-04-01 12:30:42 +010031}
32
33static inline void flush(void)
34{
35}
36
37/*
38 * nothing to do
39 */
40#define arch_decomp_setup()
viresh kumarbf976b52010-04-01 12:30:42 +010041
42#endif /* __PLAT_UNCOMPRESS_H */