diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:06 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:06 +0200 |
commit | 1c3dd326ad790934fd88ec086e75a9d61ddaef8a (patch) | |
tree | 2d8304a4b2cc244ae24d3c24c0c25a5025c8f2f1 /drivers | |
parent | af4c90f4c2338247d0ae94d4d77cb20cb5b593c7 (diff) |
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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/generic.c | 113 |
1 files changed, 29 insertions, 84 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index cce6311b02d..d543abc26c7 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, |