blob: f4551269aaf2e667ed7829857df75c65ed82e6a4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-arm/arch-pxa/uncompress.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
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.
10 */
11
Philipp Zabel49db76e2007-11-22 17:57:30 +010012#include <linux/serial_reg.h>
13#include <asm/arch/pxa-regs.h>
Eric Miao6d3dfe42008-06-02 15:58:03 +080014#include <asm/mach-types.h>
Philipp Zabel49db76e2007-11-22 17:57:30 +010015
Eric Miao6d3dfe42008-06-02 15:58:03 +080016#define __REG(x) ((volatile unsigned long *)x)
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Eric Miao6d3dfe42008-06-02 15:58:03 +080018static volatile unsigned long *UART = FFUART;
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
Russell Kinga0815682006-03-28 10:24:33 +010020static inline void putc(char c)
Linus Torvalds1da177e2005-04-16 15:20:36 -070021{
Philipp Zabel49db76e2007-11-22 17:57:30 +010022 if (!(UART[UART_IER] & IER_UUE))
23 return;
24 while (!(UART[UART_LSR] & LSR_TDRQ))
Russell Kinga0815682006-03-28 10:24:33 +010025 barrier();
Philipp Zabel49db76e2007-11-22 17:57:30 +010026 UART[UART_TX] = c;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027}
28
29/*
30 * This does not append a newline
31 */
Russell Kinga0815682006-03-28 10:24:33 +010032static inline void flush(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070033{
Linus Torvalds1da177e2005-04-16 15:20:36 -070034}
35
Eric Miao6d3dfe42008-06-02 15:58:03 +080036static inline void arch_decomp_setup(void)
37{
38 if (machine_is_littleton())
39 UART = STUART;
40}
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042/*
43 * nothing to do
44 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#define arch_decomp_wdog()