]> git.ipfire.org Git - people/arne_f/kernel.git/blame - arch/arm/mach-iop32x/include/mach/uncompress.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[people/arne_f/kernel.git] / arch / arm / mach-iop32x / include / mach / uncompress.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
3f7e5815 2/*
a09e64fb 3 * arch/arm/mach-iop32x/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 u8 *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_iq80321())
29 uart_base = (volatile u8 *)IQ80321_UART;
a8135fcf 30 else if (machine_is_iq31244() || machine_is_em7210())
3f7e5815
LB
31 uart_base = (volatile u8 *)IQ31244_UART;
32 else
33 uart_base = (volatile u8 *)0xfe800000;
34}
35
36/*
37 * nothing to do
38 */
39#define arch_decomp_setup() __arch_decomp_setup(arch_id)