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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [vr4181/] [osprey/] [setup.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * linux/arch/mips/vr4181/setup.c
3
 *
4
 * VR41xx setup routines
5
 *
6
 * Copyright (C) 1999 Bradley D. LaRonde
7
 * Copyright (C) 1999, 2000 Michael Klar
8
 *
9
 * Copyright 2001 MontaVista Software Inc.
10
 * Author: jsun@mvista.com or jsun@junsun.net
11
 *
12
 * This file is subject to the terms and conditions of the GNU General Public
13
 * License.  See the file "COPYING" in the main directory of this archive
14
 * for more details.
15
 *
16
 */
17
 
18
#include <linux/config.h>
19
#include <linux/console.h>
20
#include <linux/ide.h>
21
#include <linux/init.h>
22
#include <linux/delay.h>
23
#include <asm/reboot.h>
24
#include <asm/vr4181/vr4181.h>
25
#include <asm/io.h>
26
 
27
 
28
extern void nec_osprey_restart(char* c);
29
extern void nec_osprey_halt(void);
30
extern void nec_osprey_power_off(void);
31
 
32
extern void vr4181_init_serial(void);
33
extern void vr4181_init_time(void);
34
 
35
void __init nec_osprey_setup(void)
36
{
37
        set_io_port_base(VR4181_PORT_BASE);
38
        isa_slot_offset = VR4181_ISAMEM_BASE;
39
 
40
        vr4181_init_serial();
41
        vr4181_init_time();
42
 
43
#ifdef CONFIG_FB
44
        conswitchp = &dummy_con;
45
#endif
46
 
47
        _machine_restart = nec_osprey_restart;
48
        _machine_halt = nec_osprey_halt;
49
        _machine_power_off = nec_osprey_power_off;
50
 
51
        /* setup resource limit */
52
        ioport_resource.end = 0xffffffff;
53
        iomem_resource.end = 0xffffffff;
54
 
55
        /* [jsun] hack */
56
        /*
57
        printk("[jsun] hack to change external ISA control register, %x -> %x\n",
58
                (*VR4181_XISACTL),
59
                (*VR4181_XISACTL) | 0x2);
60
        *VR4181_XISACTL |= 0x2;
61
        */
62
 
63
        // *VR4181_GPHIBSTH = 0x2000;
64
        // *VR4181_GPMD0REG = 0x00c0;
65
        // *VR4181_GPINTEN       = 1<<6;
66
 
67
        /* [jsun] I believe this will get the interrupt type right
68
         * for the ether port.
69
         */
70
        *VR4181_GPINTTYPL = 0x3000;
71
}

powered by: WebSVN 2.1.0

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