2 * include/asm-arm/arch-ixp4xx/uncompress.h
4 * Copyright (C) 2002 Intel Corporation.
5 * Copyright (C) 2003-2004 MontaVista Software, Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
13 #ifndef _ARCH_UNCOMPRESS_H_
14 #define _ARCH_UNCOMPRESS_H_
16 #include <asm/hardware.h>
17 #include <asm/mach-types.h>
18 #include <linux/serial_reg.h>
20 #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
22 static int console_output
= 1;
23 static volatile u32
* uart_base
;
25 static inline void putc(int c
)
27 /* Check THRE and TEMT bits before we transmit the character.
30 while ((uart_base
[UART_LSR
] & TX_DONE
) != TX_DONE
)
37 static void flush(void)
41 static __inline__
void __arch_decomp_setup(unsigned long arch_id
)
44 * Coyote and gtwx5715 only have UART2 connected
46 if (machine_is_adi_coyote() || machine_is_gtwx5715())
47 uart_base
= (volatile u32
*) IXP4XX_UART2_BASE_PHYS
;
49 uart_base
= (volatile u32
*) IXP4XX_UART1_BASE_PHYS
;
51 if (machine_is_ess710() || machine_is_ivpn() || machine_is_sg560() ||
52 machine_is_sg565() || machine_is_sg580() || machine_is_sg720() ||
53 machine_is_shiva1100() || machine_is_sg590())
58 * arch_id is a variable in decompress_kernel()
60 #define arch_decomp_setup() __arch_decomp_setup(arch_id)
62 #if defined(CONFIG_MACH_SG560) || defined(CONFIG_MACH_SG580) || \
63 defined(CONFIG_MACH_ESS710) || defined(CONFIG_MACH_SG720) || \
64 defined(CONFIG_MACH_SG590) || defined(CONFIG_MACH_IVPN)
65 #define arch_decomp_wdog() \
66 *((volatile u32 *)(IXP4XX_GPIO_BASE_PHYS+IXP4XX_GPIO_GPOUTR_OFFSET)) ^= 0x00004000
67 #elif defined(CONFIG_MACH_SG565) || defined(CONFIG_MACH_SHIVA1100)
68 #define arch_decomp_wdog() \
69 *((volatile unsigned char *) SG565_WATCHDOG_BASE_PHYS) = 0
71 #define arch_decomp_wdog()