summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/generic.c113
1 files changed, 29 insertions, 84 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index cce6311b02df..d543abc26c71 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -75,104 +75,49 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
hwif->swdma_mask = 0x07;
}
-#if 0
- /* Logic to add back later on */
-
- if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
- ide_pci_device_t *unknown = unknown_chipset;
- init_setup_unknown(dev, unknown);
- return 1;
+#define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \
+ { \
+ .name = name_str, \
+ .init_hwif = init_hwif_generic, \
+ .autodma = dma_setting, \
+ .bootable = ON_BOARD, \
+ .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, \
}
- return 0;
-#endif
static ide_pci_device_t generic_chipsets[] __devinitdata = {
- { /* 0 */
- .name = "Unknown",
- .init_hwif = init_hwif_generic,
- .autodma = AUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 1 */
+ /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", AUTODMA),
+
+ { /* 1 */
.name = "NS87410",
.init_hwif = init_hwif_generic,
.autodma = AUTODMA,
.enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
.bootable = ON_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 2 */
- .name = "SAMURAI",
- .init_hwif = init_hwif_generic,
- .autodma = AUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 3 */
- .name = "HT6565",
- .init_hwif = init_hwif_generic,
- .autodma = AUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 4 */
- .name = "UM8673F",
- .init_hwif = init_hwif_generic,
- .autodma = NODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 5 */
- .name = "UM8886A",
- .init_hwif = init_hwif_generic,
- .autodma = NODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 6 */
- .name = "UM8886BF",
- .init_hwif = init_hwif_generic,
- .autodma = NODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 7 */
- .name = "HINT_IDE",
- .init_hwif = init_hwif_generic,
- .autodma = AUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 8 */
- .name = "VIA_IDE",
- .init_hwif = init_hwif_generic,
- .autodma = NOAUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 9 */
- .name = "OPTI621V",
- .init_hwif = init_hwif_generic,
- .autodma = NOAUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 10 */
+ },
+
+ /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", AUTODMA),
+ /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", AUTODMA),
+ /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", NODMA),
+ /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", NODMA),
+ /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", NODMA),
+ /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", AUTODMA),
+ /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", NOAUTODMA),
+ /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", NOAUTODMA),
+
+ { /* 10 */
.name = "VIA8237SATA",
.init_hwif = init_hwif_generic,
.autodma = AUTODMA,
.bootable = OFF_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 11 */
- .name = "Piccolo0102",
- .init_hwif = init_hwif_generic,
- .autodma = NOAUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 12 */
- .name = "Piccolo0103",
- .init_hwif = init_hwif_generic,
- .autodma = NOAUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 13 */
- .name = "Piccolo0105",
- .init_hwif = init_hwif_generic,
- .autodma = NOAUTODMA,
- .bootable = ON_BOARD,
- .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
- },{ /* 14 */
+ },
+
+ /* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102", NOAUTODMA),
+ /* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103", NOAUTODMA),
+ /* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105", NOAUTODMA),
+
+ { /* 14 */
.name = "Revolution",
.init_hwif = init_hwif_generic,
.autodma = AUTODMA,