Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / mach-lpc32xx / include / mach / uncompress.h
blobc142487d299af59aa4382811e376e32e27fdaed2
1 /*
2 * arch/arm/mach-lpc32xx/include/mach/uncompress.h
4 * Author: Kevin Wells <kevin.wells@nxp.com>
6 * Copyright (C) 2010 NXP Semiconductors
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
19 #ifndef __ASM_ARM_ARCH_UNCOMPRESS_H
20 #define __ASM_ARM_ARCH_UNCOMPRESS_H
22 #include <linux/io.h>
24 #include <mach/hardware.h>
25 #include <mach/platform.h>
28 * Uncompress output is hardcoded to standard UART 5
31 #define UART_FIFO_CTL_TX_RESET (1 << 2)
32 #define UART_STATUS_TX_MT (1 << 6)
34 #define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x))
36 #define LPC32XX_UART_DLLFIFO_O 0x00
37 #define LPC32XX_UART_IIRFCR_O 0x08
38 #define LPC32XX_UART_LSR_O 0x14
40 static inline void putc(int ch)
42 /* Wait for transmit FIFO to empty */
43 while ((__raw_readl(_UARTREG(LPC32XX_UART_LSR_O)) &
44 UART_STATUS_TX_MT) == 0)
47 __raw_writel((u32) ch, _UARTREG(LPC32XX_UART_DLLFIFO_O));
50 static inline void flush(void)
52 __raw_writel(__raw_readl(_UARTREG(LPC32XX_UART_IIRFCR_O)) |
53 UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O));
56 /* NULL functions; we don't presently need them */
57 #define arch_decomp_setup()
58 #define arch_decomp_wdog()
60 #endif