sh: avoid using PCIBIOS_MIN_xxx
Replaces PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM with direct struct
pci_channel access. This allows us to have more than one pci
channel.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/arch/sh/drivers/pci/pci-sh5.c b/arch/sh/drivers/pci/pci-sh5.c
index 008a02e..7750da2 100644
--- a/arch/sh/drivers/pci/pci-sh5.c
+++ b/arch/sh/drivers/pci/pci-sh5.c
@@ -206,6 +206,9 @@
return 0;
}
+#define xPCIBIOS_MIN_IO board_pci_channels->io_resource->start
+#define xPCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
+
void __devinit pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_dev *dev = bus->self;
@@ -223,9 +226,9 @@
/* For now, propagate host limits to the bus;
* we'll adjust them later. */
bus->resource[0]->end = 64*1024 - 1 ;
- bus->resource[1]->end = PCIBIOS_MIN_MEM+(256*1024*1024)-1;
- bus->resource[0]->start = PCIBIOS_MIN_IO;
- bus->resource[1]->start = PCIBIOS_MIN_MEM;
+ bus->resource[1]->end = xPCIBIOS_MIN_MEM+(256*1024*1024)-1;
+ bus->resource[0]->start = xPCIBIOS_MIN_IO;
+ bus->resource[1]->start = xPCIBIOS_MIN_MEM;
/* Turn off downstream PF memory address range by default */
bus->resource[2]->start = 1024*1024;