aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/drivers/pci/pci-dreamcast.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-20 21:34:36 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-20 21:34:36 +0900
commit951a681bda844491de8699b3bdc6c3899cbd4c9f (patch)
tree4c0ed37b6906d06ff440f64b1fd8f297952526f5 /arch/sh/drivers/pci/pci-dreamcast.c
parent37c8ac361efdbae969eff1a603bc39412d3e873f (diff)
sh: pci: Convert dreamcast to new-style interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 @@
#include <linux/irq.h>
#include <linux/pci.h>
#include <linux/module.h>
-
#include <asm/io.h>
#include <asm/irq.h>
#include <mach/pci.h>
@@ -40,11 +39,19 @@ static struct resource gapspci_mem_resource = {
.flags = IORESOURCE_MEM,
};
+static struct pci_channel dreamcast_pci_controller = {
+ .pci_ops = &gapspci_pci_ops,
+ .io_resource = &gapspci_io_resource,
+ .io_offset = 0x00000000,
+ .mem_resource = &gapspci_mem_resource,
+ .mem_offset = 0x00000000,
+};
+
/*
* gapspci init
*/
-static int __init gapspci_init(struct pci_channel *chan)
+static int __init gapspci_init(void)
{
char idbuf[16];
int i;
@@ -88,18 +95,8 @@ static int __init gapspci_init(struct pci_channel *chan)
outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10);
outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14);
+ register_pci_controller(&dreamcast_pci_controller);
+
return 0;
}
-
-struct pci_channel board_pci_channels[] = {
- {
- .init = gapspci_init,
- .pci_ops = &gapspci_pci_ops,
- .io_resource = &gapspci_io_resource,
- .mem_resource = &gapspci_mem_resource,
- .first_devfn = 0,
- .last_devfn = 1,
- }, {
- .init = NULL,
- }
-};
+arch_initcall(gapspci_init);