aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci-dreamcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/pci/pci-dreamcast.c')
-rw-r--r--arch/sh/drivers/pci/pci-dreamcast.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/arch/sh/drivers/pci/pci-dreamcast.c b/arch/sh/drivers/pci/pci-dreamcast.c
index 0897be5053d4..210f9d4af141 100644
--- a/arch/sh/drivers/pci/pci-dreamcast.c
+++ b/arch/sh/drivers/pci/pci-dreamcast.c
@@ -21,7 +21,6 @@
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/module.h> 23#include <linux/module.h>
24
25#include <asm/io.h> 24#include <asm/io.h>
26#include <asm/irq.h> 25#include <asm/irq.h>
27#include <mach/pci.h> 26#include <mach/pci.h>
@@ -40,11 +39,19 @@ static struct resource gapspci_mem_resource = {
40 .flags = IORESOURCE_MEM, 39 .flags = IORESOURCE_MEM,
41}; 40};
42 41
42static struct pci_channel dreamcast_pci_controller = {
43 .pci_ops = &gapspci_pci_ops,
44 .io_resource = &gapspci_io_resource,
45 .io_offset = 0x00000000,
46 .mem_resource = &gapspci_mem_resource,
47 .mem_offset = 0x00000000,
48};
49
43/* 50/*
44 * gapspci init 51 * gapspci init
45 */ 52 */
46 53
47static int __init gapspci_init(struct pci_channel *chan) 54static int __init gapspci_init(void)
48{ 55{
49 char idbuf[16]; 56 char idbuf[16];
50 int i; 57 int i;
@@ -88,18 +95,8 @@ static int __init gapspci_init(struct pci_channel *chan)
88 outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); 95 outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10);
89 outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); 96 outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14);
90 97
98 register_pci_controller(&dreamcast_pci_controller);
99
91 return 0; 100 return 0;
92} 101}
93 102arch_initcall(gapspci_init);
94struct pci_channel board_pci_channels[] = {
95 {
96 .init = gapspci_init,
97 .pci_ops = &gapspci_pci_ops,
98 .io_resource = &gapspci_io_resource,
99 .mem_resource = &gapspci_mem_resource,
100 .first_devfn = 0,
101 .last_devfn = 1,
102 }, {
103 .init = NULL,
104 }
105};