import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / mips / galileo-boards / ev96100 / pci_ops.c
1 /*
2  *
3  * BRIEF MODULE DESCRIPTION
4  *      Galileo EV96100 board specific pci support.
5  *
6  * Copyright 2000 MontaVista Software Inc.
7  * Author: MontaVista Software, Inc.
8  *              ppopov@mvista.com or source@mvista.com
9  *
10  * This file was derived from Carsten Langgaard's
11  * arch/mips/mips-boards/generic/pci.c
12  *
13  * Carsten Langgaard, carstenl@mips.com
14  * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
15  *
16  *  This program is free software; you can redistribute  it and/or modify it
17  *  under  the terms of  the GNU General  Public License as published by the
18  *  Free Software Foundation;  either version 2 of the  License, or (at your
19  *  option) any later version.
20  *
21  *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
22  *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
23  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
24  *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
25  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26  *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
27  *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28  *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
29  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30  *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  *  You should have received a copy of the  GNU General Public License along
33  *  with this program; if not, write  to the Free Software Foundation, Inc.,
34  *  675 Mass Ave, Cambridge, MA 02139, USA.
35  */
36 #include <linux/init.h>
37 #include <linux/types.h>
38 #include <linux/pci.h>
39 #include <linux/kernel.h>
40
41 #include <asm/delay.h>
42 #include <asm/gt64120/gt64120.h>
43 #include <asm/pci_channel.h>
44
45 #define PCI_ACCESS_READ  0
46 #define PCI_ACCESS_WRITE 1
47
48 #define GT_PCI_MEM_BASE    0x12000000
49 #define GT_PCI_MEM_SIZE    0x02000000
50 #define GT_PCI_IO_BASE     0x10000000
51 #define GT_PCI_IO_SIZE     0x02000000
52
53 static struct resource pci_io_resource = {
54         "io pci IO space",
55         0x10000000,
56         0x10000000 + 0x02000000,
57         IORESOURCE_IO
58 };
59
60 static struct resource pci_mem_resource = {
61         "ext pci memory space",
62         0x12000000,
63         0x12000000 + 0x02000000,
64         IORESOURCE_MEM
65 };
66
67 extern struct pci_ops gt64120_pci_ops;
68
69 struct pci_channel mips_pci_channels[] = {
70         { &gt64120_pci_ops, &pci_io_resource, &pci_mem_resource, 1, 0xff },
71         { NULL, NULL, NULL, NULL, NULL}
72 };