diff options
Diffstat (limited to 'drivers/ide/pci/cs5520.c')
-rw-r--r-- | drivers/ide/pci/cs5520.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index a8bf4940ca9c..aa98e817d385 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 |
@@ -125,6 +113,7 @@ static void __devinit cs5520_init_setup_dma(struct pci_dev *dev, ide_pci_device_ | |||
125 | 113 | ||
126 | static int cs5520_dma_on(ide_drive_t *drive) | 114 | static int cs5520_dma_on(ide_drive_t *drive) |
127 | { | 115 | { |
116 | /* ATAPI is harder so leave it for now */ | ||
128 | drive->vdma = 1; | 117 | drive->vdma = 1; |
129 | return 0; | 118 | return 0; |
130 | } | 119 | } |
@@ -134,29 +123,21 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | |||
134 | hwif->set_pio_mode = &cs5520_set_pio_mode; | 123 | hwif->set_pio_mode = &cs5520_set_pio_mode; |
135 | hwif->set_dma_mode = &cs5520_set_dma_mode; | 124 | hwif->set_dma_mode = &cs5520_set_dma_mode; |
136 | 125 | ||
137 | if (hwif->dma_base == 0) { | 126 | if (hwif->dma_base == 0) |
138 | hwif->drives[1].autotune = hwif->drives[0].autotune = 1; | ||
139 | return; | 127 | return; |
140 | } | ||
141 | 128 | ||
142 | hwif->ide_dma_on = &cs5520_dma_on; | 129 | hwif->ide_dma_on = &cs5520_dma_on; |
143 | |||
144 | /* ATAPI is harder so leave it for now */ | ||
145 | hwif->atapi_dma = 0; | ||
146 | hwif->ultra_mask = 0; | ||
147 | hwif->swdma_mask = 0; | ||
148 | hwif->mwdma_mask = 0; | ||
149 | } | 130 | } |
150 | 131 | ||
151 | #define DECLARE_CS_DEV(name_str) \ | 132 | #define DECLARE_CS_DEV(name_str) \ |
152 | { \ | 133 | { \ |
153 | .name = name_str, \ | 134 | .name = name_str, \ |
154 | .init_setup_dma = cs5520_init_setup_dma, \ | ||
155 | .init_hwif = init_hwif_cs5520, \ | 135 | .init_hwif = init_hwif_cs5520, \ |
156 | .autodma = AUTODMA, \ | ||
157 | .bootable = ON_BOARD, \ | ||
158 | .host_flags = IDE_HFLAG_ISA_PORTS | \ | 136 | .host_flags = IDE_HFLAG_ISA_PORTS | \ |
159 | IDE_HFLAG_VDMA, \ | 137 | IDE_HFLAG_CS5520 | \ |
138 | IDE_HFLAG_VDMA | \ | ||
139 | IDE_HFLAG_NO_ATAPI_DMA | \ | ||
140 | IDE_HFLAG_BOOTABLE, \ | ||
160 | .pio_mask = ATA_PIO4, \ | 141 | .pio_mask = ATA_PIO4, \ |
161 | } | 142 | } |
162 | 143 | ||