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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [vr41xx/] [zao-capcella/] [setup.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * FILE NAME
3
 *      arch/mips/vr41xx/zao-capcella/setup.c
4
 *
5
 * BRIEF MODULE DESCRIPTION
6
 *      Setup for the ZAO Networks Capcella.
7
 *
8
 * Copyright 2002 Yoichi Yuasa
9
 *                yuasa@hh.iij4u.or.jp
10
 *
11
 *  This program is free software; you can redistribute it and/or modify it
12
 *  under the terms of the GNU General Public License as published by the
13
 *  Free Software Foundation; either version 2 of the License, or (at your
14
 *  option) any later version.
15
 */
16
#include <linux/config.h>
17
#include <linux/init.h>
18
#include <linux/console.h>
19
#include <linux/ide.h>
20
#include <linux/ioport.h>
21
 
22
#include <asm/pci_channel.h>
23
#include <asm/reboot.h>
24
#include <asm/time.h>
25
#include <asm/vr41xx/capcella.h>
26
 
27
#ifdef CONFIG_BLK_DEV_INITRD
28
extern unsigned long initrd_start, initrd_end;
29
extern void * __rd_start, * __rd_end;
30
#endif
31
 
32
#ifdef CONFIG_PCI
33
static struct resource vr41xx_pci_io_resource = {
34
        "PCI I/O space",
35
        VR41XX_PCI_IO_START,
36
        VR41XX_PCI_IO_END,
37
        IORESOURCE_IO
38
};
39
 
40
static struct resource vr41xx_pci_mem_resource = {
41
        "PCI memory space",
42
        VR41XX_PCI_MEM_START,
43
        VR41XX_PCI_MEM_END,
44
        IORESOURCE_MEM
45
};
46
 
47
extern struct pci_ops vr41xx_pci_ops;
48
 
49
struct pci_channel mips_pci_channels[] = {
50
        {&vr41xx_pci_ops, &vr41xx_pci_io_resource, &vr41xx_pci_mem_resource, 0, 256},
51
        {NULL, NULL, NULL, 0, 0}
52
};
53
 
54
struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
55
        VR41XX_PCI_MEM1_BASE,
56
        VR41XX_PCI_MEM1_MASK,
57
        IO_MEM1_RESOURCE_START
58
};
59
 
60
struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
61
        VR41XX_PCI_MEM2_BASE,
62
        VR41XX_PCI_MEM2_MASK,
63
        IO_MEM2_RESOURCE_START
64
};
65
 
66
struct vr41xx_pci_address_space vr41xx_pci_io = {
67
        VR41XX_PCI_IO_BASE,
68
        VR41XX_PCI_IO_MASK,
69
        IO_PORT_RESOURCE_START
70
};
71
 
72
static struct vr41xx_pci_address_map pci_address_map = {
73
        &vr41xx_pci_mem1,
74
        &vr41xx_pci_mem2,
75
        &vr41xx_pci_io
76
};
77
#endif
78
 
79
void __init zao_capcella_setup(void)
80
{
81
        set_io_port_base(IO_PORT_BASE);
82
        ioport_resource.start = IO_PORT_RESOURCE_START;
83
        ioport_resource.end = IO_PORT_RESOURCE_END;
84
        iomem_resource.start = IO_MEM1_RESOURCE_START;
85
        iomem_resource.end = IO_MEM2_RESOURCE_END;
86
 
87
#ifdef CONFIG_BLK_DEV_INITRD
88
        ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
89
        initrd_start = (unsigned long)&__rd_start;
90
        initrd_end = (unsigned long)&__rd_end;
91
#endif
92
 
93
        _machine_restart = vr41xx_restart;
94
        _machine_halt = vr41xx_halt;
95
        _machine_power_off = vr41xx_power_off;
96
 
97
        board_time_init = vr41xx_time_init;
98
        board_timer_setup = vr41xx_timer_setup;
99
 
100
#ifdef CONFIG_FB
101
        conswitchp = &dummy_con;
102
#endif
103
 
104
#if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE)
105
        ide_ops = &vr41xx_ide_ops;
106
#endif
107
 
108
        vr41xx_bcu_init();
109
 
110
        vr41xx_cmu_init();
111
 
112
        vr41xx_siu_init(SIU_RS232C, 0);
113
        vr41xx_dsiu_init();
114
 
115
#ifdef CONFIG_PCI
116
        vr41xx_pciu_init(&pci_address_map);
117
#endif
118
}

powered by: WebSVN 2.1.0

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