blob: 5cf71da60e424502aa87c3dd2e23e34ac55dcfc1 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
2 * arch/arm/mach-sa1100/include/mach/uncompress.h
3 *
Nicolas Pitre2f82af02009-09-14 03:25:28 -04004 * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
Russell Kinga09e64f2008-08-05 16:14:15 +01005 *
6 * Reorganised to be machine independent.
7 */
8
9#include "hardware.h"
10
Russell King31696632012-06-06 11:42:36 +010011#define IOMEM(x) (x)
12
Russell Kinga09e64f2008-08-05 16:14:15 +010013/*
14 * The following code assumes the serial port has already been
15 * initialized by the bootloader. We search for the first enabled
16 * port in the most probable order. If you didn't setup a port in
17 * your bootloader then nothing will appear (which might be desired).
18 */
19
20#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
21
22static void putc(int c)
23{
24 unsigned long serial_port;
25
26 do {
27 serial_port = _Ser3UTCR0;
28 if (UART(UTCR3) & UTCR3_TXE) break;
29 serial_port = _Ser1UTCR0;
30 if (UART(UTCR3) & UTCR3_TXE) break;
31 serial_port = _Ser2UTCR0;
32 if (UART(UTCR3) & UTCR3_TXE) break;
33 return;
34 } while (0);
35
36 /* wait for space in the UART's transmitter */
37 while (!(UART(UTSR1) & UTSR1_TNF))
38 barrier();
39
40 /* send the character out. */
41 UART(UTDR) = c;
42}
43
44static inline void flush(void)
45{
46}
47
48/*
49 * Nothing to do for these
50 */
51#define arch_decomp_setup()
52#define arch_decomp_wdog()