OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-cl7500/] [uncompress.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-cl7500/uncompress.h
3
 *
4
 * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
5
 */
6
 
7
#define BASE 0x03010000
8
#define SERBASE (BASE + (0x2f8 << 2))
9
 
10
static __inline__ void putc(char c)
11
{
12
        while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20))
13
                barrier();
14
        *((volatile unsigned int *)(SERBASE)) = c;
15
}
16
 
17
/*
18
 * This does not append a newline
19
 */
20
static void puts(const char *s)
21
{
22
        while (*s) {
23
                putc(*s);
24
                if (*s == '\n')
25
                        putc('\r');
26
                s++;
27
        }
28
}
29
 
30
static __inline__ void arch_decomp_setup(void)
31
{
32
        int baud = 3686400 / (9600 * 32);
33
 
34
        *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
35
        *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
36
        *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
37
        *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
38
        *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
39
}
40
 
41
/*
42
 * nothing to do
43
 */
44
#define arch_decomp_wdog()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.