1 /* SPDX-License-Identifier: GPL-2.0 */
3 * arch/arm/mach-iop33x/include/mach/uncompress.h
7 #include <asm/mach-types.h>
8 #include <linux/serial_reg.h>
9 #include <mach/hardware.h>
11 volatile u32
*uart_base
;
13 #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
15 static inline void putc(char c
)
17 while ((uart_base
[UART_LSR
] & TX_DONE
) != TX_DONE
)
19 uart_base
[UART_TX
] = c
;
22 static inline void flush(void)
26 static __inline__
void __arch_decomp_setup(unsigned long arch_id
)
28 if (machine_is_iq80331() || machine_is_iq80332())
29 uart_base
= (volatile u32
*)IOP33X_UART0_PHYS
;
31 uart_base
= (volatile u32
*)0xfe800000;
37 #define arch_decomp_setup() __arch_decomp_setup(arch_id)