diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2007-02-07 12:18:45 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-07 12:18:45 -0500 |
commit | 33dced2ea5ed03dda10e7f9f41f0910f32e02eaa (patch) | |
tree | 14798b33401eb2bddb5a57236390629cd188769b /drivers/pci | |
parent | d24ec426b3be3a011bc8568d53fea486b604a684 (diff) |
ide: add Toshiba TC86C001 IDE driver (take 2)
This is the driver for the Toshiba TC86C001 GOKU-S PCI IDE controller,
completely reworked from the original brain-damaged Toshiba's 2.4 version.
This single channel UltraDMA/66 controller is very simple in programming,
yet Toshiba managed to plant many interesting bugs in it. The particularly
nasty "limitation 5" (as they call the errata) caused me to abuse the IDE
core in a possibly most interesting way so far. However, this is still
better than the #ifdef mess in drivers/ide/ide-io.c that the original
version included (well, it had much more mess)...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/quirks.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c913ea4e545c..40c1825c8b93 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1481,6 +1481,24 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2609, quirk_intel_pcie_pm); | |||
1481 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); | 1481 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); |
1482 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); | 1482 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); |
1483 | 1483 | ||
1484 | /* | ||
1485 | * Toshiba TC86C001 IDE controller reports the standard 8-byte BAR0 size | ||
1486 | * but the PIO transfers won't work if BAR0 falls at the odd 8 bytes. | ||
1487 | * Re-allocate the region if needed... | ||
1488 | */ | ||
1489 | static void __init quirk_tc86c001_ide(struct pci_dev *dev) | ||
1490 | { | ||
1491 | struct resource *r = &dev->resource[0]; | ||
1492 | |||
1493 | if (r->start & 0x8) { | ||
1494 | r->start = 0; | ||
1495 | r->end = 0xf; | ||
1496 | } | ||
1497 | } | ||
1498 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2, | ||
1499 | PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE, | ||
1500 | quirk_tc86c001_ide); | ||
1501 | |||
1484 | static void __devinit quirk_netmos(struct pci_dev *dev) | 1502 | static void __devinit quirk_netmos(struct pci_dev *dev) |
1485 | { | 1503 | { |
1486 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; | 1504 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; |