2 * arch/arm/mach-netx/include/mach/uncompress.h
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * The following code assumes the serial port has already been
22 * initialized by the bootloader. We search for the first enabled
23 * port in the most probable order. If you didn't setup a port in
24 * your bootloader then nothing will appear (which might be desired).
26 * This does not append a newline
29 #define REG(x) (*(volatile unsigned long *)(x))
31 #define UART1_BASE 0x100a00
32 #define UART2_BASE 0x100a80
37 #define CR_UART_EN (1<<0)
40 #define FR_BUSY (1<<3)
41 #define FR_TXFF (1<<5)
43 static void putc(char c
)
47 if (REG(UART1_BASE
+ UART_CR
) & CR_UART_EN
)
49 else if (REG(UART2_BASE
+ UART_CR
) & CR_UART_EN
)
54 while (REG(base
+ UART_FR
) & FR_TXFF
);
55 REG(base
+ UART_DR
) = c
;
58 static inline void flush(void)
62 if (REG(UART1_BASE
+ UART_CR
) & CR_UART_EN
)
64 else if (REG(UART2_BASE
+ UART_CR
) & CR_UART_EN
)
69 while (REG(base
+ UART_FR
) & FR_BUSY
);
75 #define arch_decomp_setup()
76 #define arch_decomp_wdog()