aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx/include/mach/uncompress.h
diff options
context:
space:
mode:
authorKevin Wells <wellsk40@gmail.com>2010-02-26 15:53:38 -0800
committerKevin Wells <wellsk40@gmail.com>2010-07-27 03:08:08 -0700
commit437db5903653f6a8a736e77ad5c21a296d74299b (patch)
treebe1a44710420d6260db04b23876d650c54df838b /arch/arm/mach-lpc32xx/include/mach/uncompress.h
parentd15aa2cc641bd193596382357de917b32f1b40cb (diff)
downloadkernel_samsung_smdk4412-437db5903653f6a8a736e77ad5c21a296d74299b.zip
kernel_samsung_smdk4412-437db5903653f6a8a736e77ad5c21a296d74299b.tar.gz
kernel_samsung_smdk4412-437db5903653f6a8a736e77ad5c21a296d74299b.tar.bz2
ARM: LPC32XX: Initial arch header files
Header files for the LPC32xx arch Signed-off-by: Kevin Wells <wellsk40@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-lpc32xx/include/mach/uncompress.h')
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/uncompress.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
new file mode 100644
index 0000000..c142487
--- /dev/null
+++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h
@@ -0,0 +1,60 @@
+/*
+ * arch/arm/mach-lpc32xx/include/mach/uncompress.h
+ *
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARM_ARCH_UNCOMPRESS_H
+#define __ASM_ARM_ARCH_UNCOMPRESS_H
+
+#include <linux/io.h>
+
+#include <mach/hardware.h>
+#include <mach/platform.h>
+
+/*
+ * Uncompress output is hardcoded to standard UART 5
+ */
+
+#define UART_FIFO_CTL_TX_RESET (1 << 2)
+#define UART_STATUS_TX_MT (1 << 6)
+
+#define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x))
+
+#define LPC32XX_UART_DLLFIFO_O 0x00
+#define LPC32XX_UART_IIRFCR_O 0x08
+#define LPC32XX_UART_LSR_O 0x14
+
+static inline void putc(int ch)
+{
+ /* Wait for transmit FIFO to empty */
+ while ((__raw_readl(_UARTREG(LPC32XX_UART_LSR_O)) &
+ UART_STATUS_TX_MT) == 0)
+ ;
+
+ __raw_writel((u32) ch, _UARTREG(LPC32XX_UART_DLLFIFO_O));
+}
+
+static inline void flush(void)
+{
+ __raw_writel(__raw_readl(_UARTREG(LPC32XX_UART_IIRFCR_O)) |
+ UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O));
+}
+
+/* NULL functions; we don't presently need them */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
+
+#endif