aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci-sh7751.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-11 02:47:23 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 03:00:13 -0400
commit710fa3c81151948ac4d836ef52b57cef91b0ab72 (patch)
tree57718b3badc0817db419dce57716973a3faa0f1e /arch/sh/drivers/pci/pci-sh7751.c
parentd0e3db40e2a1352aa2a2f425a7d4631bddc03d51 (diff)
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>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7751.c')
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index 230db8bd9744..447234c69ab1 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -144,22 +144,20 @@ int __init sh7751_pcic_init(struct pci_channel *chan,
144 /* Set the local 16MB PCI memory space window to 144 /* Set the local 16MB PCI memory space window to
145 * the lowest PCI mapped address 145 * the lowest PCI mapped address
146 */ 146 */
147 word = PCIBIOS_MIN_MEM & SH4_PCIMBR_MASK; 147 word = chan->mem_resource->start & SH4_PCIMBR_MASK;
148 pr_debug("PCI: Setting upper bits of Memory window to 0x%x\n", word); 148 pr_debug("PCI: Setting upper bits of Memory window to 0x%x\n", word);
149 pci_write_reg(chan, word , SH4_PCIMBR); 149 pci_write_reg(chan, word , SH4_PCIMBR);
150 150
151 /* Map IO space into PCI IO window 151 /* Map IO space into PCI IO window:
152 * The IO window is 64K-PCIBIOS_MIN_IO in size 152 * IO addresses will be translated to the PCI IO window base address
153 * IO addresses will be translated to the
154 * PCI IO window base address
155 */ 153 */
156 pr_debug("PCI: Mapping IO address 0x%x - 0x%x to base 0x%x\n", 154 pr_debug("PCI: Mapping IO address 0x%x - 0x%x to base 0x%x\n",
157 PCIBIOS_MIN_IO, (64 << 10), 155 chan->io_resource->start, chan->io_resource->end,
158 SH7751_PCI_IO_BASE + PCIBIOS_MIN_IO); 156 SH7751_PCI_IO_BASE + chan->io_resource->start);
159 157
160 /* Make sure the MSB's of IO window are set to access PCI space 158 /* Make sure the MSB's of IO window are set to access PCI space
161 * correctly */ 159 * correctly */
162 word = PCIBIOS_MIN_IO & SH4_PCIIOBR_MASK; 160 word = chan->io_resource->start & SH4_PCIIOBR_MASK;
163 pr_debug("PCI: Setting upper bits of IO window to 0x%x\n", word); 161 pr_debug("PCI: Setting upper bits of IO window to 0x%x\n", word);
164 pci_write_reg(chan, word, SH4_PCIIOBR); 162 pci_write_reg(chan, word, SH4_PCIIOBR);
165 163