This source file includes following definitions.
- ide_pci_access_error
- init_rz1000
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #undef REALLY_SLOW_IO
15
16 #include <linux/types.h>
17 #include <linux/kernel.h>
18 #include <linux/delay.h>
19 #include <linux/timer.h>
20 #include <linux/mm.h>
21 #include <linux/ioport.h>
22 #include <linux/blkdev.h>
23 #include <linux/hdreg.h>
24 #include <asm/io.h>
25 #include <linux/bios32.h>
26 #include <linux/pci.h>
27 #include "ide.h"
28
29 static void ide_pci_access_error (int rc)
30 {
31 printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
32 }
33
34 void init_rz1000 (byte bus, byte fn)
35 {
36 int rc;
37 unsigned short reg;
38
39 printk("ide: buggy RZ1000 interface: ");
40 if ((rc = pcibios_read_config_word (bus, fn, PCI_COMMAND, ®))) {
41 ide_pci_access_error (rc);
42 } else if (!(reg & 1)) {
43 printk("not enabled\n");
44 } else {
45 if ((rc = pcibios_read_config_word(bus, fn, 0x40, ®))
46 || (rc = pcibios_write_config_word(bus, fn, 0x40, reg & 0xdfff)))
47 {
48 ide_hwifs[0].no_unmask = 1;
49 ide_hwifs[1].no_unmask = 1;
50 ide_hwifs[0].serialized = 1;
51 ide_pci_access_error (rc);
52 printk("serialized, disabled unmasking\n");
53 } else
54 printk("disabled read-ahead\n");
55 }
56 }