aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-03-28 11:04:39 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-05-06 22:11:55 -0400
commitcd6c7ea234dc8a8607283e056d8010b2bd3c6369 (patch)
treeabcf26a22e77ba00c219151997101b9678fba3fc /arch
parent0264f1603904dbee3196abc748a53fb0b23b8046 (diff)
sh: Add a dummy SH-4 PCIC fixup.
By default we don't have anything to fix up for the SH-4 PCIC, boards can overload this as necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/drivers/pci/ops-sh4.c6
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/arch/sh/drivers/pci/ops-sh4.c b/arch/sh/drivers/pci/ops-sh4.c
index 2d4371009a5e..54232f13e406 100644
--- a/arch/sh/drivers/pci/ops-sh4.c
+++ b/arch/sh/drivers/pci/ops-sh4.c
@@ -162,3 +162,9 @@ char * __init pcibios_setup(char *str)
162 162
163 return str; 163 return str;
164} 164}
165
166int __attribute__((weak)) pci_fixup_pcic(void)
167{
168 /* Nothing to do. */
169 return 0;
170}
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index f3ead58a9519..1aca7fe5783b 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -12,7 +12,6 @@
12 * License. See linux/COPYING for more information. 12 * License. See linux/COPYING for more information.
13 * 13 *
14 */ 14 */
15
16#undef DEBUG 15#undef DEBUG
17 16
18#include <linux/init.h> 17#include <linux/init.h>
@@ -28,7 +27,7 @@
28 * Initialization. Try all known PCI access methods. Note that we support 27 * Initialization. Try all known PCI access methods. Note that we support
29 * using both PCI BIOS and direct access: in such cases, we use I/O ports 28 * using both PCI BIOS and direct access: in such cases, we use I/O ports
30 * to access config space. 29 * to access config space.
31 * 30 *
32 * Note that the platform specific initialization (BSC registers, and memory 31 * Note that the platform specific initialization (BSC registers, and memory
33 * space mapping) will be called via the platform defined function 32 * space mapping) will be called via the platform defined function
34 * pcibios_init_platform(). 33 * pcibios_init_platform().
@@ -115,7 +114,7 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map)
115 * Wait Cycle Control + Parity Enable + Bus Master + 114 * Wait Cycle Control + Parity Enable + Bus Master +
116 * Mem space enable 115 * Mem space enable
117 */ 116 */
118 word = SH7751_PCICONF1_WCC | SH7751_PCICONF1_PER | 117 word = SH7751_PCICONF1_WCC | SH7751_PCICONF1_PER |
119 SH7751_PCICONF1_BUM | SH7751_PCICONF1_MES; 118 SH7751_PCICONF1_BUM | SH7751_PCICONF1_MES;
120 pci_write_reg(word, SH7751_PCICONF1); 119 pci_write_reg(word, SH7751_PCICONF1);
121 120
@@ -123,10 +122,10 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map)
123 word = PCI_BASE_CLASS_BRIDGE << 24; 122 word = PCI_BASE_CLASS_BRIDGE << 24;
124 pci_write_reg(word, SH7751_PCICONF2); 123 pci_write_reg(word, SH7751_PCICONF2);
125 124
126 /* Set IO and Mem windows to local address 125 /* Set IO and Mem windows to local address
127 * Make PCI and local address the same for easy 1 to 1 mapping 126 * Make PCI and local address the same for easy 1 to 1 mapping
128 * Window0 = map->window0.size @ non-cached area base = SDRAM 127 * Window0 = map->window0.size @ non-cached area base = SDRAM
129 * Window1 = map->window1.size @ cached area base = SDRAM 128 * Window1 = map->window1.size @ cached area base = SDRAM
130 */ 129 */
131 word = map->window0.size - 1; 130 word = map->window0.size - 1;
132 pci_write_reg(word, SH4_PCILSR0); 131 pci_write_reg(word, SH4_PCILSR0);
@@ -175,7 +174,7 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map)
175 case SH7751_CS5_BASE_ADDR: word = __area_sdram_check(5); break; 174 case SH7751_CS5_BASE_ADDR: word = __area_sdram_check(5); break;
176 case SH7751_CS6_BASE_ADDR: word = __area_sdram_check(6); break; 175 case SH7751_CS6_BASE_ADDR: word = __area_sdram_check(6); break;
177 } 176 }
178 177
179 if (!word) 178 if (!word)
180 return 0; 179 return 0;
181 180
@@ -194,9 +193,7 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map)
194 * DMA interrupts... 193 * DMA interrupts...
195 */ 194 */
196 195
197#if defined(CONFIG_SH_RTS7751R2D) || defined(CONFIG_SH_LBOX_RE2)
198 pci_fixup_pcic(); 196 pci_fixup_pcic();
199#endif
200 197
201 /* SH7751 init done, set central function init complete */ 198 /* SH7751 init done, set central function init complete */
202 /* use round robin mode to stop a device starving/overruning */ 199 /* use round robin mode to stop a device starving/overruning */