ide: add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driver

* Add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driver
  and use it to cleanup generic_chipsets[].

* Remove dead/obsolete code while at it.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent af4c90f4
...@@ -75,104 +75,49 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif) ...@@ -75,104 +75,49 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
hwif->swdma_mask = 0x07; hwif->swdma_mask = 0x07;
} }
#if 0 #define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \
/* Logic to add back later on */ { \
.name = name_str, \
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { .init_hwif = init_hwif_generic, \
ide_pci_device_t *unknown = unknown_chipset; .autodma = dma_setting, \
init_setup_unknown(dev, unknown); .bootable = ON_BOARD, \
return 1; .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, \
} }
return 0;
#endif
static ide_pci_device_t generic_chipsets[] __devinitdata = { static ide_pci_device_t generic_chipsets[] __devinitdata = {
{ /* 0 */ /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", AUTODMA),
.name = "Unknown",
.init_hwif = init_hwif_generic, { /* 1 */
.autodma = AUTODMA,
.bootable = ON_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
},{ /* 1 */
.name = "NS87410", .name = "NS87410",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
},{ /* 2 */ },
.name = "SAMURAI",
.init_hwif = init_hwif_generic, /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", AUTODMA),
.autodma = AUTODMA, /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", AUTODMA),
.bootable = ON_BOARD, /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", NODMA),
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", NODMA),
},{ /* 3 */ /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", NODMA),
.name = "HT6565", /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", AUTODMA),
.init_hwif = init_hwif_generic, /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", NOAUTODMA),
.autodma = AUTODMA, /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", NOAUTODMA),
.bootable = ON_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, { /* 10 */
},{ /* 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 */
.name = "VIA8237SATA", .name = "VIA8237SATA",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
},{ /* 11 */ },
.name = "Piccolo0102",
.init_hwif = init_hwif_generic, /* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102", NOAUTODMA),
.autodma = NOAUTODMA, /* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103", NOAUTODMA),
.bootable = ON_BOARD, /* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105", NOAUTODMA),
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
},{ /* 12 */ { /* 14 */
.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 */
.name = "Revolution", .name = "Revolution",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.autodma = AUTODMA, .autodma = AUTODMA,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment