aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-20 08:34:36 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-20 08:34:36 -0400
commit951a681bda844491de8699b3bdc6c3899cbd4c9f (patch)
tree4c0ed37b6906d06ff440f64b1fd8f297952526f5 /arch
parent37c8ac361efdbae969eff1a603bc39412d3e873f (diff)
sh: pci: Convert dreamcast to new-style interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/drivers/pci/Kconfig5
-rw-r--r--arch/sh/drivers/pci/fixups-dreamcast.c2
-rw-r--r--arch/sh/drivers/pci/pci-dreamcast.c27
3 files changed, 14 insertions, 20 deletions
diff --git a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig
index 5aaee3c707b0..1d53496b1498 100644
--- a/arch/sh/drivers/pci/Kconfig
+++ b/arch/sh/drivers/pci/Kconfig
@@ -20,11 +20,8 @@ config SH_PCIDMA_NONCOHERENT
20 20
21# Temporary config option for transitioning off of PCI_AUTO 21# Temporary config option for transitioning off of PCI_AUTO
22config PCI_NEW 22config PCI_NEW
23 bool 23 def_bool y
24 depends on PCI 24 depends on PCI
25 default y if CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7780 || \
26 CPU_SUBTYPE_SH7785 || CPU_SH5 || \
27 CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
28 25
29# This is also board-specific 26# This is also board-specific
30config PCI_AUTO 27config PCI_AUTO
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c
index 48c6381fffaa..ed7f489936f1 100644
--- a/arch/sh/drivers/pci/fixups-dreamcast.c
+++ b/arch/sh/drivers/pci/fixups-dreamcast.c
@@ -30,7 +30,7 @@
30 30
31static void __init gapspci_fixup_resources(struct pci_dev *dev) 31static void __init gapspci_fixup_resources(struct pci_dev *dev)
32{ 32{
33 struct pci_channel *p = board_pci_channels; 33 struct pci_channel *p = dev->sysdata;
34 34
35 printk(KERN_NOTICE "PCI: Fixing up device %s\n", pci_name(dev)); 35 printk(KERN_NOTICE "PCI: Fixing up device %s\n", pci_name(dev));
36 36
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};