*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/ide.h>
+#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <asm/irq.h>
* DMA channel
*/
-static int cs5520_dma_setup(ide_drive_t *drive)
+static int cs5520_dma_on(ide_drive_t *drive)
{
- /* If DMA setup works then VDMA on */
- drive->vdma = ide_dma_setup(drive) ? 1: 0;
- return drive->vdma;
+ drive->vdma = 1;
+ return 0;
}
static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
hwif->tuneproc = &cs5520_tune_drive;
hwif->speedproc = &cs5520_tune_chipset;
hwif->ide_dma_check = &cs5520_config_drive_xfer_rate;
- hwif->ide_dma_setup = &cs5520_dma_setup;
+ hwif->ide_dma_on = &cs5520_dma_on;
if(!noautodma)
hwif->autodma = 1;
/* We must not grab the entire device, it has 'ISA' space in its
BARS too and we will freak out other bits of the kernel */
- if(pci_enable_device_bars(dev, 1<<2))
- {
+ if (pci_enable_device_bars(dev, 1<<2)) {
printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name);
- return -EBUSY;
+ return -ENODEV;
}
pci_set_master(dev);
- if (pci_set_dma_mask(dev, 0xFFFFFFFF)) {
+ if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
printk(KERN_WARNING "cs5520: No suitable DMA available.\n");
return -ENODEV;
}
.probe = cs5520_init_one,
};
-static int cs5520_ide_init(void)
+static int __init cs5520_ide_init(void)
{
return ide_pci_register_driver(&driver);
}