aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r--drivers/ide/pci/siimage.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index eda11050a02d..faf0be31ba57 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -640,13 +640,9 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
640 640
641static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const char *name) 641static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const char *name)
642{ 642{
643 u32 class_rev = 0; 643 u8 rev = dev->revision, tmpbyte = 0, BA5_EN = 0;
644 u8 tmpbyte = 0;
645 u8 BA5_EN = 0;
646 644
647 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); 645 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, rev ? 1 : 255);
648 class_rev &= 0xff;
649 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (class_rev) ? 1 : 255);
650 646
651 pci_read_config_byte(dev, 0x8A, &BA5_EN); 647 pci_read_config_byte(dev, 0x8A, &BA5_EN);
652 if ((BA5_EN & 0x01) || (pci_resource_start(dev, 5))) { 648 if ((BA5_EN & 0x01) || (pci_resource_start(dev, 5))) {
@@ -825,19 +821,14 @@ static void __devinit siimage_fixup(ide_hwif_t *hwif)
825 821
826static void __devinit init_iops_siimage(ide_hwif_t *hwif) 822static void __devinit init_iops_siimage(ide_hwif_t *hwif)
827{ 823{
828 struct pci_dev *dev = hwif->pci_dev;
829 u32 class_rev = 0;
830
831 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
832 class_rev &= 0xff;
833
834 hwif->hwif_data = NULL; 824 hwif->hwif_data = NULL;
835 825
836 /* Pessimal until we finish probing */ 826 /* Pessimal until we finish probing */
837 hwif->rqsize = 15; 827 hwif->rqsize = 15;
838 828
839 if (pci_get_drvdata(dev) == NULL) 829 if (pci_get_drvdata(hwif->pci_dev) == NULL)
840 return; 830 return;
831
841 init_mmio_iops_siimage(hwif); 832 init_mmio_iops_siimage(hwif);
842} 833}
843 834