diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-23 11:25:13 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 16:54:35 -0400 |
commit | 32d00d0f933ea5d21c3cd0809461ebbf7ab89cef (patch) | |
tree | 485581a75b87eaee5cb10184985f6293285cc8c5 /arch/mips/pci/ops-tx4927.c | |
parent | a0e31fb09056224c5d6fef09d25cb96b6149aa7c (diff) |
[MIPS] TXx9: PCI fixes for tx3927/tx4927
* Fix tx3927 pci ops for Type-1 configuration
* Fix abort checking of tx3927 pci ops
* Flush write buffer to avoid spurious PCI error interrupt
* Add a quirk for FPCIB backplane
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pci/ops-tx4927.c')
-rw-r--r-- | arch/mips/pci/ops-tx4927.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index c6b49bccd274..6d844094ef5d 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c | |||
@@ -85,6 +85,8 @@ static int check_abort(struct tx4927_pcic_reg __iomem *pcicptr) | |||
85 | __raw_writel((__raw_readl(&pcicptr->pcistatus) & 0x0000ffff) | 85 | __raw_writel((__raw_readl(&pcicptr->pcistatus) & 0x0000ffff) |
86 | | (PCI_STATUS_REC_MASTER_ABORT << 16), | 86 | | (PCI_STATUS_REC_MASTER_ABORT << 16), |
87 | &pcicptr->pcistatus); | 87 | &pcicptr->pcistatus); |
88 | /* flush write buffer */ | ||
89 | iob(); | ||
88 | code = PCIBIOS_DEVICE_NOT_FOUND; | 90 | code = PCIBIOS_DEVICE_NOT_FOUND; |
89 | } | 91 | } |
90 | return code; | 92 | return code; |
@@ -406,3 +408,35 @@ void tx4927_report_pcic_status(void) | |||
406 | tx4927_report_pcic_status1(pcicptrs[i].pcicptr); | 408 | tx4927_report_pcic_status1(pcicptrs[i].pcicptr); |
407 | } | 409 | } |
408 | } | 410 | } |
411 | |||
412 | #ifdef CONFIG_TOSHIBA_FPCIB0 | ||
413 | static void __init tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) | ||
414 | { | ||
415 | struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); | ||
416 | |||
417 | if (!pcicptr) | ||
418 | return; | ||
419 | if (__raw_readl(&pcicptr->pbacfg) & TX4927_PCIC_PBACFG_PBAEN) { | ||
420 | /* Reset Bus Arbiter */ | ||
421 | __raw_writel(TX4927_PCIC_PBACFG_RPBA, &pcicptr->pbacfg); | ||
422 | /* | ||
423 | * swap reqBP and reqXP (raise priority of SLC90E66). | ||
424 | * SLC90E66(PCI-ISA bridge) is connected to REQ2 on | ||
425 | * PCI Backplane board. | ||
426 | */ | ||
427 | __raw_writel(0x72543610, &pcicptr->pbareqport); | ||
428 | __raw_writel(0, &pcicptr->pbabm); | ||
429 | /* Use Fixed ParkMaster (required by SLC90E66) */ | ||
430 | __raw_writel(TX4927_PCIC_PBACFG_FIXPA, &pcicptr->pbacfg); | ||
431 | /* Enable Bus Arbiter */ | ||
432 | __raw_writel(TX4927_PCIC_PBACFG_FIXPA | | ||
433 | TX4927_PCIC_PBACFG_PBAEN, | ||
434 | &pcicptr->pbacfg); | ||
435 | printk(KERN_INFO "PCI: Use Fixed Park Master (REQPORT %08x)\n", | ||
436 | __raw_readl(&pcicptr->pbareqport)); | ||
437 | } | ||
438 | } | ||
439 | #define PCI_DEVICE_ID_EFAR_SLC90E66_0 0x9460 | ||
440 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_0, | ||
441 | tx4927_quirk_slc90e66_bridge); | ||
442 | #endif | ||