X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Fcs5520.c;h=e65dec73ce977b904ed3922a90135230f7ce3e95;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=dc0f6c8044a567f58c39f257f1014b74eb2a2e98;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index dc0f6c804..e65dec73c 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -51,7 +51,7 @@ #include #include -#include "cs5520.h" +#define DISPLAY_CS5520_TIMINGS #if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) #include @@ -251,7 +251,24 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) hwif->drives[0].autodma = hwif->autodma; hwif->drives[1].autodma = hwif->autodma; } - + +#define DECLARE_CS_DEV(name_str) \ + { \ + .name = name_str, \ + .init_chipset = init_chipset_cs5520, \ + .init_setup_dma = cs5520_init_setup_dma, \ + .init_hwif = init_hwif_cs5520, \ + .channels = 2, \ + .autodma = AUTODMA, \ + .bootable = ON_BOARD, \ + .flags = IDEPCI_FLAG_ISA_PORTS, \ + } + +static ide_pci_device_t cyrix_chipsets[] __devinitdata = { + /* 0 */ DECLARE_CS_DEV("Cyrix 5510"), + /* 1 */ DECLARE_CS_DEV("Cyrix 5520") +}; + /* * The 5510/5520 are a bit weird. They don't quite set up the way * the PCI helper layer expects so we must do much of the set up @@ -273,7 +290,10 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic return 1; } pci_set_master(dev); - pci_set_dma_mask(dev, 0xFFFFFFFF); + if (pci_set_dma_mask(dev, 0xFFFFFFFF)) { + printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); + return -ENODEV; + } init_chipset_cs5520(dev, d->name); index.all = 0xf0f0; @@ -302,7 +322,7 @@ static struct pci_device_id cs5520_pci_tbl[] = { MODULE_DEVICE_TABLE(pci, cs5520_pci_tbl); static struct pci_driver driver = { - .name = "CyrixIDE", + .name = "Cyrix_IDE", .id_table = cs5520_pci_tbl, .probe = cs5520_init_one, };