Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / mach-netx / include / mach / uncompress.h
blob84f91284f6128844366d68b5d77e68a1ae59145f
1 /*
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
34 #define UART_DR 0x0
36 #define UART_CR 0x14
37 #define CR_UART_EN (1<<0)
39 #define UART_FR 0x18
40 #define FR_BUSY (1<<3)
41 #define FR_TXFF (1<<5)
43 static void putc(char c)
45 unsigned long base;
47 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
48 base = UART1_BASE;
49 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
50 base = UART2_BASE;
51 else
52 return;
54 while (REG(base + UART_FR) & FR_TXFF);
55 REG(base + UART_DR) = c;
58 static inline void flush(void)
60 unsigned long base;
62 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
63 base = UART1_BASE;
64 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
65 base = UART2_BASE;
66 else
67 return;
69 while (REG(base + UART_FR) & FR_BUSY);
73 * nothing to do
75 #define arch_decomp_setup()
76 #define arch_decomp_wdog()