Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181154
b: refs/heads/master
c: ac8ab54
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jan 29, 2010
1 parent 6a8750e commit ff0f492
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a45635dfb08a1fa2cf77bf1f2c4074961ce2e625
refs/heads/master: ac8ab54a8e41a5ed0ee2161d45b6dc855490989f
22 changes: 9 additions & 13 deletions trunk/arch/sh/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ static DEFINE_MUTEX(pci_scan_mutex);

void __devinit register_pci_controller(struct pci_channel *hose)
{
request_resource(&iomem_resource, hose->mem_resource);
request_resource(&ioport_resource, hose->io_resource);
if (request_resource(&iomem_resource, hose->mem_resource) < 0)
goto out;
if (request_resource(&ioport_resource, hose->io_resource) < 0) {
release_resource(hose->mem_resource);
goto out;
}

*hose_tail = hose;
hose_tail = &hose->next;
Expand All @@ -76,6 +80,9 @@ void __devinit register_pci_controller(struct pci_channel *hose)
pcibios_scanbus(hose);
mutex_unlock(&pci_scan_mutex);
}

out:
printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n");
}

static int __init pcibios_init(void)
Expand Down Expand Up @@ -319,20 +326,9 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)

if (flags & IORESOURCE_IO)
return ioport_map_pci(dev, start, len);

/*
* Presently the IORESOURCE_MEM case is a bit special, most
* SH7751 style PCI controllers have PCI memory at a fixed
* location in the address space where no remapping is desired.
* With the IORESOURCE_MEM case more care has to be taken
* to inhibit page table mapping for legacy cores, but this is
* punted off to __ioremap().
* -- PFM.
*/
if (flags & IORESOURCE_MEM) {
if (flags & IORESOURCE_CACHEABLE)
return ioremap(start, len);

return ioremap_nocache(start, len);
}

Expand Down

0 comments on commit ff0f492

Please sign in to comment.