blob: c437e0c88c3f9c94f95cda9bab906654672b1c21 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-arm/arch-cl7500/uncompress.h
3 *
4 * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
5 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#define BASE 0x03010000
7#define SERBASE (BASE + (0x2f8 << 2))
8
Russell Kinga0815682006-03-28 10:24:33 +01009static inline void putc(char c)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010{
Russell Kinga0815682006-03-28 10:24:33 +010011 while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20))
12 barrier();
13
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 *((volatile unsigned int *)(SERBASE)) = c;
15}
16
Russell Kinga0815682006-03-28 10:24:33 +010017static inline void flush(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070018{
Linus Torvalds1da177e2005-04-16 15:20:36 -070019}
20
21static __inline__ void arch_decomp_setup(void)
22{
23 int baud = 3686400 / (9600 * 32);
24
25 *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
26 *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
27 *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
28 *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
29 *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
30}
31
32/*
33 * nothing to do
34 */
35#define arch_decomp_wdog()