aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/generic.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:30 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:30 -0400
commit8acf28c090f0e5e049f56b27bdd7cf1fb40c6b98 (patch)
treecbf910b986d423d030c5917515b3c68368aed70f /drivers/ide/pci/generic.c
parent528a572daea90aa41db92683e5a8756acef514c4 (diff)
ide: add IDE_HFLAG_FORCE_LEGACY_IRQS host flag
Add IDE_HFLAG_FORCE_LEGACY_IRQS host flag to tell ide_pci_setup_ports() to always set hwif->irq to legacy IRQ 14/15 and convert generic IDE PCI and via82cxxx host drivers to use it. While at it: * Add IDE_HFLAGS_UMC define (generic IDE PCI host driver). * Remove no longer needed init_hwif_generic() (generic IDE PCI host driver). * Set d->udma_mask instead of hwif->ultra_mask (via82cxxx host driver). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r--drivers/ide/pci/generic.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 51165832e7f2..b377006d416c 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -54,25 +54,13 @@ __setup("all-generic-ide", ide_generic_all_on);
54module_param_named(all_generic_ide, ide_generic_all, bool, 0444); 54module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
55MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); 55MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");
56 56
57static void __devinit init_hwif_generic (ide_hwif_t *hwif) 57#define IDE_HFLAGS_UMC (IDE_HFLAG_NO_DMA | IDE_HFLAG_FORCE_LEGACY_IRQS)
58{
59 switch(hwif->pci_dev->device) {
60 case PCI_DEVICE_ID_UMC_UM8673F:
61 case PCI_DEVICE_ID_UMC_UM8886A:
62 case PCI_DEVICE_ID_UMC_UM8886BF:
63 hwif->irq = hwif->channel ? 15 : 14;
64 break;
65 default:
66 break;
67 }
68}
69 58
70#define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \ 59#define DECLARE_GENERIC_PCI_DEV(name_str, extra_flags) \
71 { \ 60 { \
72 .name = name_str, \ 61 .name = name_str, \
73 .init_hwif = init_hwif_generic, \
74 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ 62 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \
75 dma_setting | \ 63 extra_flags | \
76 IDE_HFLAG_BOOTABLE, \ 64 IDE_HFLAG_BOOTABLE, \
77 .swdma_mask = ATA_SWDMA2, \ 65 .swdma_mask = ATA_SWDMA2, \
78 .mwdma_mask = ATA_MWDMA2, \ 66 .mwdma_mask = ATA_MWDMA2, \
@@ -84,7 +72,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
84 72
85 { /* 1 */ 73 { /* 1 */
86 .name = "NS87410", 74 .name = "NS87410",
87 .init_hwif = init_hwif_generic,
88 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, 75 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
89 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | 76 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
90 IDE_HFLAG_BOOTABLE, 77 IDE_HFLAG_BOOTABLE,
@@ -95,16 +82,15 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
95 82
96 /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0), 83 /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0),
97 /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", 0), 84 /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", 0),
98 /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", IDE_HFLAG_NO_DMA), 85 /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", IDE_HFLAGS_UMC),
99 /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", IDE_HFLAG_NO_DMA), 86 /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", IDE_HFLAGS_UMC),
100 /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", IDE_HFLAG_NO_DMA), 87 /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", IDE_HFLAGS_UMC),
101 /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", 0), 88 /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", 0),
102 /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", IDE_HFLAG_NO_AUTODMA), 89 /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", IDE_HFLAG_NO_AUTODMA),
103 /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", IDE_HFLAG_NO_AUTODMA), 90 /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", IDE_HFLAG_NO_AUTODMA),
104 91
105 { /* 10 */ 92 { /* 10 */
106 .name = "VIA8237SATA", 93 .name = "VIA8237SATA",
107 .init_hwif = init_hwif_generic,
108 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | 94 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
109 IDE_HFLAG_OFF_BOARD, 95 IDE_HFLAG_OFF_BOARD,
110 .swdma_mask = ATA_SWDMA2, 96 .swdma_mask = ATA_SWDMA2,
@@ -118,7 +104,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
118 104
119 { /* 14 */ 105 { /* 14 */
120 .name = "Revolution", 106 .name = "Revolution",
121 .init_hwif = init_hwif_generic,
122 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | 107 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
123 IDE_HFLAG_OFF_BOARD, 108 IDE_HFLAG_OFF_BOARD,
124 .swdma_mask = ATA_SWDMA2, 109 .swdma_mask = ATA_SWDMA2,