2 * linux/include/asm-arm/arch-nexuspci/uncompress.h
4 * Copyright (C) 1998, 1999, 2000 Philip Blundell
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
14 #include <asm/hardware.h>
18 * Write a character to the UART
20 void _ll_write_char(char c)
22 while (!(__raw_readb(DUART_START + 0x4) & 0x4))
24 __raw_writeb(c, DUART_START + 0xc);
28 * This does not append a newline
30 static void puts(const char *s)
35 _ll_write_char(*(s++));
40 * Set up for decompression
42 static void arch_decomp_setup(void)
45 __raw_writel(INTCONT_LED, INTCONT_START);
48 __raw_writeb(42, DUART_START + 8);
49 __raw_writeb(48, DUART_START + 8);
50 __raw_writeb(16, DUART_START + 8);
51 __raw_writeb(0x93, DUART_START);
52 __raw_writeb(0x17, DUART_START);
53 __raw_writeb(0xbb, DUART_START + 4);
54 __raw_writeb(0x78, DUART_START + 16);
55 __raw_writeb(0xa0, DUART_START + 8);
56 __raw_writeb(5, DUART_START + 8);
60 * Stroke the watchdog so we don't get reset during decompression.
62 static inline void arch_decomp_wdog(void)
64 __raw_writel(INTCONT_WATCHDOG, INTCONT_START);
65 __raw_writel(INTCONT_WATCHDOG | 1, INTCONT_START);