aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/drivers/pci/pci-sh7780.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-17 14:09:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-17 14:09:09 +0900
commit0bbc9bc3189f24de946777af43c9033c8c4871e4 (patch)
tree996a03383430848a62746d8ffb9c5035d0d9a4ca /arch/sh/drivers/pci/pci-sh7780.c
parent7e4ba0d77c96d328ba968ddff4a464d4d2fa7abc (diff)
sh: pci: Set class/sub-class code correctly for SH7780 PCIC.
The SH7780 PCI host controller implements a configuration header that requires a fair bit of hand-holding to initialize properly. By default it appears as a pre-2.0 host controller given the zeroed out class code, so fix this up properly. Some boards that happened to be using the R7780RP version of the PCIC fixups had set this correctly, but this belongs in the standard initialization, and is by no means board specific. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7780.c')
-rw-r--r--arch/sh/drivers/pci/pci-sh7780.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index 45fa423f2e5..7f4f5903754 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -72,16 +72,15 @@ int __init sh7780_pcic_init(struct pci_channel *chan,
{
u32 word;
+ pci_write_reg(chan, PCI_CLASS_BRIDGE_HOST >> 8, SH7780_PCIBCC);
+ pci_write_reg(chan, PCI_CLASS_BRIDGE_HOST & 0xff, SH7780_PCISUB);
+
/* set the command/status bits to:
* Wait Cycle Control + Parity Enable + Bus Master +
* Mem space enable
*/
pci_write_reg(chan, 0x00000046, SH7780_PCICMD);
- /* define this host as the host bridge */
- word = PCI_BASE_CLASS_BRIDGE << 24;
- pci_write_reg(chan, word, SH7780_PCIRID);
-
/* Set IO and Mem windows to local address
* Make PCI and local address the same for easy 1 to 1 mapping
*/