]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - arch/arm/mach-iop33x/include/mach/uncompress.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / arm / mach-iop33x / include / mach / uncompress.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
3f7e5815 2/*
a09e64fb 3 * arch/arm/mach-iop33x/include/mach/uncompress.h
3f7e5815 4 */
c852ac80 5
3f7e5815
LB
6#include <asm/types.h>
7#include <asm/mach-types.h>
8#include <linux/serial_reg.h>
a09e64fb 9#include <mach/hardware.h>
3f7e5815 10
8ea0de4b 11volatile u32 *uart_base;
3f7e5815 12
c852ac80 13#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
3f7e5815
LB
14
15static inline void putc(char c)
16{
17 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
18 barrier();
c852ac80 19 uart_base[UART_TX] = c;
3f7e5815
LB
20}
21
22static inline void flush(void)
23{
24}
25
26static __inline__ void __arch_decomp_setup(unsigned long arch_id)
27{
28 if (machine_is_iq80331() || machine_is_iq80332())
c852ac80 29 uart_base = (volatile u32 *)IOP33X_UART0_PHYS;
3f7e5815
LB
30 else
31 uart_base = (volatile u32 *)0xfe800000;
32}
33
34/*
35 * nothing to do
36 */
37#define arch_decomp_setup() __arch_decomp_setup(arch_id)