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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-anakin/] [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-anakin/uncompress.h
3
 *
4
 *  Copyright (C) 2001 Aleph One Ltd. for Acunia N.V.
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation.
9
 *
10
 *  Changelog:
11
 *   10-Apr-2001 TTC    Created
12
 */
13
 
14
#ifndef __ASM_ARCH_UNCOMPRESS_H
15
#define __ASM_ARCH_UNCOMPRESS_H
16
 
17
#include <linux/config.h>
18
#include <asm/io.h>
19
#include <asm/arch/serial_reg.h>
20
 
21
#ifndef CONFIG_ANAKIN_DEFAULT_BAUDRATE
22
#define CONFIG_ANAKIN_DEFAULT_BAUDRATE  9600
23
#endif
24
 
25
static inline void
26
putc(int c)
27
{
28
        while (!(__raw_readl(IO_START + UART0 + 0x10) & TXEMPTY))
29
                barrier();
30
 
31
        __raw_writel(c, IO_START + UART0 + 0x14);
32
        __raw_writel(__raw_readl(IO_START + UART0 + 0x18)
33
                        | SENDREQUEST, IO_START + UART0 + 0x18);
34
}
35
 
36
static void
37
puts(const char *s)
38
{
39
        int c;
40
 
41
        while ((c = *s++)) {
42
                putc(c);
43
                if (c == '\n') putc('\r');
44
        }
45
}
46
 
47
static void
48
arch_decomp_setup(void)
49
{
50
        __raw_writel(__raw_readl(IO_START + UART0 + 0x10) & ~PRESCALER
51
                        | SETBAUD(CONFIG_ANAKIN_DEFAULT_BAUDRATE),
52
                        IO_START + UART0 + 0x10);
53
        __raw_writel(__raw_readl(IO_START + UART0 + 0x18) & ~(IRQENABLE
54
                        | RTS | DTR | BLOCKRX | PARITY),
55
                        IO_START + UART0 + 0x18);
56
}
57
 
58
#define arch_decomp_wdog()
59
 
60
#endif

powered by: WebSVN 2.1.0

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