diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
commit | 9ffcf364f9d0aca3ea79e9987c368eb75925460e (patch) | |
tree | 2916b96c1c020acd5ce19aa07fce0d6790567916 /drivers/ide/pci/cs5520.c | |
parent | 47b687882c02f802dd5bbe1227effe006820246e (diff) |
ide: remove ->init_setup_dma from ide_pci_device_t (take 2)
* Make ide_pci_device_t.host_flags u32 and add IDE_HFLAG_CS5520 host flag.
* Pass ide_pci_device_t *d to setup-pci.c::ide_get_or_set_dma_base()
and use d->name instead of hwif->cds->name.
* Set IDE_HFLAG_CS5520 host flag in cs5520 host driver and use it in
ide_get_or_set_dma_base() to find out which PCI BAR to use, remove no longer
needed cs5520.c::cs5520_init_setup_dma() and ide_pci_device_t.init_setup_dma.
This fixes PCI bus-mastering not being checked for CS5510/CS5520 hosts.
v2:
* It is wrong to check simplex bits on CS5510/CS5520 as v1 did.
(Noticed by Alan).
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/cs5520.c')
-rw-r--r-- | drivers/ide/pci/cs5520.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 17d35ca61351..4fb43206621a 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -106,18 +106,6 @@ static void cs5520_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | /* | 108 | /* |
109 | * We provide a callback for our nonstandard DMA location | ||
110 | */ | ||
111 | |||
112 | static void __devinit cs5520_init_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif) | ||
113 | { | ||
114 | unsigned long bmide = pci_resource_start(dev, 2); /* Not the usual 4 */ | ||
115 | if(hwif->mate && hwif->mate->dma_base) /* Second channel at primary + 8 */ | ||
116 | bmide += 8; | ||
117 | ide_setup_dma(hwif, bmide, 8); | ||
118 | } | ||
119 | |||
120 | /* | ||
121 | * We wrap the DMA activate to set the vdma flag. This is needed | 109 | * We wrap the DMA activate to set the vdma flag. This is needed |
122 | * so that the IDE DMA layer issues PIO not DMA commands over the | 110 | * so that the IDE DMA layer issues PIO not DMA commands over the |
123 | * DMA channel | 111 | * DMA channel |
@@ -150,9 +138,9 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | |||
150 | #define DECLARE_CS_DEV(name_str) \ | 138 | #define DECLARE_CS_DEV(name_str) \ |
151 | { \ | 139 | { \ |
152 | .name = name_str, \ | 140 | .name = name_str, \ |
153 | .init_setup_dma = cs5520_init_setup_dma, \ | ||
154 | .init_hwif = init_hwif_cs5520, \ | 141 | .init_hwif = init_hwif_cs5520, \ |
155 | .host_flags = IDE_HFLAG_ISA_PORTS | \ | 142 | .host_flags = IDE_HFLAG_ISA_PORTS | \ |
143 | IDE_HFLAG_CS5520 | \ | ||
156 | IDE_HFLAG_VDMA | \ | 144 | IDE_HFLAG_VDMA | \ |
157 | IDE_HFLAG_NO_ATAPI_DMA | \ | 145 | IDE_HFLAG_NO_ATAPI_DMA | \ |
158 | IDE_HFLAG_BOOTABLE, \ | 146 | IDE_HFLAG_BOOTABLE, \ |