summaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-29 22:38:13 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-01-29 22:38:13 +0900
commit320e68da59353fe6ad51b81f6865c4b674ad66ea (patch)
tree9fc7f0f07a6a656a6384736f17f7d52da9a9f79e /arch/sh/drivers
parentac8ab54a8e41a5ed0ee2161d45b6dc855490989f (diff)
downloadop-kernel-dev-320e68da59353fe6ad51b81f6865c4b674ad66ea.zip
op-kernel-dev-320e68da59353fe6ad51b81f6865c4b674ad66ea.tar.gz
sh: support PCI domains.
Newer SH parts are now commonly shipping with multiple controllers, so we wire up PCI domain support to deal with them. Shamelessly cloned from the MIPS implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers')
-rw-r--r--arch/sh/drivers/pci/pci.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 82e59bc..45a15ca 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -33,15 +33,22 @@ static int pci_initialized;
static void __devinit pcibios_scanbus(struct pci_channel *hose)
{
static int next_busno;
+ static int need_domain_info;
struct pci_bus *bus;
bus = pci_scan_bus(next_busno, hose->pci_ops, hose);
+ hose->bus = bus;
+
+ need_domain_info = need_domain_info || hose->index;
+ hose->need_domain_info = need_domain_info;
if (bus) {
next_busno = bus->subordinate + 1;
/* Don't allow 8-bit bus number overflow inside the hose -
reserve some space for bridges. */
- if (next_busno > 224)
+ if (next_busno > 224) {
next_busno = 0;
+ need_domain_info = 1;
+ }
pci_bus_size_bridges(bus);
pci_bus_assign_resources(bus);
@@ -307,9 +314,15 @@ static void __iomem *ioport_map_pci(struct pci_dev *dev,
{
struct pci_channel *chan = dev->sysdata;
- if (!chan->io_map_base)
+ if (unlikely(!chan->io_map_base)) {
chan->io_map_base = generic_io_base;
+ if (pci_domains_supported)
+ panic("To avoid data corruption io_map_base MUST be "
+ "set with multiple PCI domains.");
+ }
+
+
return (void __iomem *)(chan->io_map_base + port);
}
OpenPOWER on IntegriCloud