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

Subversion Repositories or1k

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-l7200/uncompress.h
3
 *
4
 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5
 *
6
 * Changelog:
7
 *  05-01-2000  SJH     Created
8
 *  05-13-2000  SJH     Filled in function bodies
9
 *  07-26-2000  SJH     Removed hard coded buad rate
10
 */
11
 
12
#include <asm/hardware.h>
13
 
14
#define IO_UART  IO_START + 0x00044000
15
 
16
#define __raw_writeb(v,p)       (*(volatile unsigned char *)(p) = (v))
17
#define __raw_readb(p)          (*(volatile unsigned char *)(p))
18
 
19
static __inline__ void putc(char c)
20
{
21
        while(__raw_readb(IO_UART + 0x18) & 0x20 ||
22
              __raw_readb(IO_UART + 0x18) & 0x08)
23
                barrier();
24
        __raw_writeb(c, IO_UART + 0x00);
25
}
26
 
27
static void puts(const char *s)
28
{
29
        while (*s) {
30
                if (*s == 10) {                 /* If a LF, add CR */
31
                        putc(10);
32
                        putc(13);
33
                }
34
                putc(*(s++));
35
        }
36
}
37
 
38
static __inline__ void arch_decomp_setup(void)
39
{
40
        __raw_writeb(0x00, IO_UART + 0x08);     /* Set HSB */
41
        __raw_writeb(0x00, IO_UART + 0x20);     /* Disable IRQs */
42
        __raw_writeb(0x01, IO_UART + 0x14);     /* Enable UART */
43
}
44
 
45
#define arch_decomp_wdog()

powered by: WebSVN 2.1.0

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