aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/drivers/pci/fixups-r7780rp.c2
-rw-r--r--arch/sh/drivers/pci/fixups-sdk7780.c2
-rw-r--r--arch/sh/drivers/pci/fixups-se7780.c2
-rw-r--r--arch/sh/drivers/pci/pci-sh5.c9
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c14
-rw-r--r--arch/sh/drivers/pci/pci-sh7780.c10
6 files changed, 19 insertions, 20 deletions
diff --git a/arch/sh/drivers/pci/fixups-r7780rp.c b/arch/sh/drivers/pci/fixups-r7780rp.c
index 5b25021bbd62..31f8dfbfcbf5 100644
--- a/arch/sh/drivers/pci/fixups-r7780rp.c
+++ b/arch/sh/drivers/pci/fixups-r7780rp.c
@@ -37,7 +37,7 @@ int pci_fixup_pcic(struct pci_channel *chan)
37#endif 37#endif
38 38
39 /* Set IOBR for windows containing area specified in pci.h */ 39 /* Set IOBR for windows containing area specified in pci.h */
40 pci_write_reg(chan, (PCIBIOS_MIN_IO & ~(SH7780_PCI_IO_SIZE - 1)), 40 pci_write_reg(chan, chan->io_resource->start & ~(SH7780_PCI_IO_SIZE-1),
41 SH7780_PCIIOBR); 41 SH7780_PCIIOBR);
42 pci_write_reg(chan, ((SH7780_PCI_IO_SIZE-1) & (7<<18)), 42 pci_write_reg(chan, ((SH7780_PCI_IO_SIZE-1) & (7<<18)),
43 SH7780_PCIIOBMR); 43 SH7780_PCIIOBMR);
diff --git a/arch/sh/drivers/pci/fixups-sdk7780.c b/arch/sh/drivers/pci/fixups-sdk7780.c
index 3f6754a120ed..c2957312b30b 100644
--- a/arch/sh/drivers/pci/fixups-sdk7780.c
+++ b/arch/sh/drivers/pci/fixups-sdk7780.c
@@ -50,7 +50,7 @@ int pci_fixup_pcic(struct pci_channel *chan)
50 pci_write_reg(chan, 0x00FC0000 , SH7780_PCIMBMR0); /* 16M */ 50 pci_write_reg(chan, 0x00FC0000 , SH7780_PCIMBMR0); /* 16M */
51 51
52 /* Set IOBR for window containing area specified in pci.h */ 52 /* Set IOBR for window containing area specified in pci.h */
53 pci_write_reg(chan, PCIBIOS_MIN_IO & ~(SH7780_PCI_IO_SIZE-1), 53 pci_write_reg(chan, chan->io_resource->start & ~(SH7780_PCI_IO_SIZE-1),
54 SH7780_PCIIOBR); 54 SH7780_PCIIOBR);
55 pci_write_reg(chan, (SH7780_PCI_IO_SIZE-1) & (7 << 18), 55 pci_write_reg(chan, (SH7780_PCI_IO_SIZE-1) & (7 << 18),
56 SH7780_PCIIOBMR); 56 SH7780_PCIIOBMR);
diff --git a/arch/sh/drivers/pci/fixups-se7780.c b/arch/sh/drivers/pci/fixups-se7780.c
index b8e735e01c3c..a968af7d6f70 100644
--- a/arch/sh/drivers/pci/fixups-se7780.c
+++ b/arch/sh/drivers/pci/fixups-se7780.c
@@ -51,7 +51,7 @@ int pci_fixup_pcic(struct pci_channel *chan)
51 pci_write_reg(chan, 0x00FC0000 , SH7780_PCIMBMR0); /* 16M */ 51 pci_write_reg(chan, 0x00FC0000 , SH7780_PCIMBMR0); /* 16M */
52 52
53 /* Set IOBR for window containing area specified in pci.h */ 53 /* Set IOBR for window containing area specified in pci.h */
54 pci_write_reg(chan, PCIBIOS_MIN_IO & ~(SH7780_PCI_IO_SIZE-1), 54 pci_write_reg(chan, chan->io_resource->start & ~(SH7780_PCI_IO_SIZE-1),
55 SH7780_PCIIOBR); 55 SH7780_PCIIOBR);
56 pci_write_reg(chan, (SH7780_PCI_IO_SIZE-1) & (7 << 18), 56 pci_write_reg(chan, (SH7780_PCI_IO_SIZE-1) & (7 << 18),
57 SH7780_PCIIOBMR); 57 SH7780_PCIIOBMR);
diff --git a/arch/sh/drivers/pci/pci-sh5.c b/arch/sh/drivers/pci/pci-sh5.c
index 008a02ec0d9f..7750da276284 100644
--- a/arch/sh/drivers/pci/pci-sh5.c
+++ b/arch/sh/drivers/pci/pci-sh5.c
@@ -206,6 +206,9 @@ int __init sh5pci_init(unsigned long memStart, unsigned long memSize)
206 return 0; 206 return 0;
207} 207}
208 208
209#define xPCIBIOS_MIN_IO board_pci_channels->io_resource->start
210#define xPCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
211
209void __devinit pcibios_fixup_bus(struct pci_bus *bus) 212void __devinit pcibios_fixup_bus(struct pci_bus *bus)
210{ 213{
211 struct pci_dev *dev = bus->self; 214 struct pci_dev *dev = bus->self;
@@ -223,9 +226,9 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
223 /* For now, propagate host limits to the bus; 226 /* For now, propagate host limits to the bus;
224 * we'll adjust them later. */ 227 * we'll adjust them later. */
225 bus->resource[0]->end = 64*1024 - 1 ; 228 bus->resource[0]->end = 64*1024 - 1 ;
226 bus->resource[1]->end = PCIBIOS_MIN_MEM+(256*1024*1024)-1; 229 bus->resource[1]->end = xPCIBIOS_MIN_MEM+(256*1024*1024)-1;
227 bus->resource[0]->start = PCIBIOS_MIN_IO; 230 bus->resource[0]->start = xPCIBIOS_MIN_IO;
228 bus->resource[1]->start = PCIBIOS_MIN_MEM; 231 bus->resource[1]->start = xPCIBIOS_MIN_MEM;
229 232
230 /* Turn off downstream PF memory address range by default */ 233 /* Turn off downstream PF memory address range by default */
231 bus->resource[2]->start = 1024*1024; 234 bus->resource[2]->start = 1024*1024;
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
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index 4706e880b087..e8f3a308c075 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -130,14 +130,12 @@ int __init sh7780_pcic_init(struct pci_channel *chan,
130 pci_write_reg(chan, map->window1.base, SH4_PCILAR1); 130 pci_write_reg(chan, map->window1.base, SH4_PCILAR1);
131 pci_write_reg(chan, map->window1.base, SH7780_PCIMBAR1); 131 pci_write_reg(chan, map->window1.base, SH7780_PCIMBAR1);
132 132
133 /* Map IO space into PCI IO window 133 /* Map IO space into PCI IO window:
134 * The IO window is 64K-PCIBIOS_MIN_IO in size 134 * IO addresses will be translated to the PCI IO window base address
135 * IO addresses will be translated to the
136 * PCI IO window base address
137 */ 135 */
138 pr_debug("PCI: Mapping IO address 0x%x - 0x%x to base 0x%x\n", 136 pr_debug("PCI: Mapping IO address 0x%x - 0x%x to base 0x%x\n",
139 PCIBIOS_MIN_IO, (64 << 10), 137 chan->io_resource->start, chan->io_resource->end,
140 SH7780_PCI_IO_BASE + PCIBIOS_MIN_IO); 138 SH7780_PCI_IO_BASE + chan->io_resource->start);
141 139
142 /* NOTE: I'm ignoring the PCI error IRQs for now.. 140 /* NOTE: I'm ignoring the PCI error IRQs for now..
143 * TODO: add support for the internal error interrupts and 141 * TODO: add support for the internal error interrupts and