1 #include <linux/config.h>
2 #include <linux/types.h>
3 #include <linux/kernel.h>
4 #include <linux/timer.h>
6 #include <linux/ioport.h>
7 #include <linux/interrupt.h>
8 #include <linux/blkdev.h>
9 #include <linux/hdreg.h>
10 #include <linux/pci.h>
11 #include <linux/ide.h>
16 #include "ide_modes.h"
18 void ide_init_sl82c105(ide_hwif_t
*hwif
)
20 struct pci_dev
*dev
= hwif
->pci_dev
;
23 pci_read_config_word(dev
, PCI_COMMAND
, &t16
);
24 printk("SL82C105 command word: %x\n",t16
);
25 t16
|= PCI_COMMAND_IO
;
26 pci_write_config_word(dev
, PCI_COMMAND
, t16
);
28 pci_read_config_dword(dev
, 0x44, &t32
);
29 printk("IDE timing: %08x, resetting to PIO0 timing\n",t32
);
30 pci_write_config_dword(dev
, 0x44, 0x03e4);
32 pci_read_config_dword(dev
, 0x40, &t32
);
33 printk("IDE control/status register: %08x\n",t32
);
34 pci_write_config_dword(dev
, 0x40, 0x10ff08a1);
35 #endif /* CONFIG_MBX */