X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Fsis5513.c;h=964f80604e27a71d1875464f27a99b381d462500;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=6c56f5670202b3093589ec8555602aab09549878;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 6c56f5670..964f80604 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -63,7 +63,8 @@ #include #include "ide-timing.h" -#include "sis5513.h" + +#define DISPLAY_SIS_TIMINGS /* registers layout and init values are chipset family dependant */ @@ -787,6 +788,15 @@ static unsigned int __init init_chipset_sis5513 (struct pci_dev *dev, const char if (trueid == 0x5518) { printk(KERN_INFO "SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller\n"); chipset_family = ATA_133; + + /* Check for 5513 compability mapping + * We must use this, else the port enabled code will fail, + * as it expects the enablebits at 0x4a. + */ + if ((idemisc & 0x40000000) == 0) { + pci_write_config_dword(dev, 0x54, idemisc | 0x40000000); + printk(KERN_INFO "SIS5513: Switching to 5513 register mapping\n"); + } } } @@ -944,23 +954,31 @@ static void __init init_hwif_sis5513 (ide_hwif_t *hwif) return; } +static ide_pci_device_t sis5513_chipset __devinitdata = { + .name = "SIS5513", + .init_chipset = init_chipset_sis5513, + .init_hwif = init_hwif_sis5513, + .channels = 2, + .autodma = NOAUTODMA, + .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, + .bootable = ON_BOARD, +}; + static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - ide_pci_device_t *d = &sis5513_chipsets[id->driver_data]; - if (dev->device != d->device) - BUG(); - ide_setup_pci_device(dev, d); + ide_setup_pci_device(dev, &sis5513_chipset); return 0; } static struct pci_device_id sis5513_pci_tbl[] = { { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5518, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl); static struct pci_driver driver = { - .name = "SIS IDE", + .name = "SIS_IDE", .id_table = sis5513_pci_tbl, .probe = sis5513_init_one, };