Fix warnings
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx-2.6 / files / arch / mips / pci / pci-bcm96348.c
1 /*
2 <:copyright-gpl
3 Copyright 2002 Broadcom Corp. All Rights Reserved.
4
5 This program is free software; you can distribute it and/or modify it
6 under the terms of the GNU General Public License (Version 2) as
7 published by the Free Software Foundation.
8
9 This program is distributed in the hope it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 :>
18 */
19 #include <linux/types.h>
20 #include <linux/pci.h>
21 #include <linux/kernel.h>
22 #include <linux/init.h>
23
24 #include <bcmpci.h>
25
26 static struct resource bcm_pci_io_resource = {
27 .name = "bcm96348 pci IO space",
28 .start = BCM_PCI_IO_BASE,
29 .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1,
30 .flags = IORESOURCE_IO
31 };
32
33 static struct resource bcm_pci_mem_resource = {
34 .name = "bcm96348 pci memory space",
35 .start = BCM_PCI_MEM_BASE,
36 .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1,
37 .flags = IORESOURCE_MEM
38 };
39
40 extern struct pci_ops bcm96348_pci_ops;
41
42 struct pci_controller bcm96348_controller = {
43 .pci_ops = &bcm96348_pci_ops,
44 .io_resource = &bcm_pci_io_resource,
45 .mem_resource = &bcm_pci_mem_resource,
46 };
47
48 static __init int bcm96348_pci_init(void)
49 {
50 /* Avoid ISA compat ranges. */
51 PCIBIOS_MIN_IO = 0x00000000;
52 PCIBIOS_MIN_MEM = 0x00000000;
53
54 /* Set I/O resource limits. */
55 ioport_resource.end = 0x1fffffff;
56 iomem_resource.end = 0xffffffff;
57
58 register_pci_controller(&bcm96348_controller);
59 return 0;
60 }
61
62 subsys_initcall(bcm96348_pci_init);