summaryrefslogtreecommitdiff
path: root/pfinet.old/linux-src/include/linux/bios32.h
diff options
context:
space:
mode:
authorroot <root@(null).(none)>2009-05-03 17:20:00 +0200
committerroot <root@(null).(none)>2009-05-03 17:20:00 +0200
commite0faf22f31c48fb27b43c1825897d26e58feafc4 (patch)
tree65a09372b31e08a3a865bd0a88cd2718bafcd643 /pfinet.old/linux-src/include/linux/bios32.h
This is my initial working version.
There is a bug in boot in this version: subhurd sometimes cannot boot.
Diffstat (limited to 'pfinet.old/linux-src/include/linux/bios32.h')
-rw-r--r--pfinet.old/linux-src/include/linux/bios32.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/pfinet.old/linux-src/include/linux/bios32.h b/pfinet.old/linux-src/include/linux/bios32.h
new file mode 100644
index 00000000..2f2c14b7
--- /dev/null
+++ b/pfinet.old/linux-src/include/linux/bios32.h
@@ -0,0 +1,34 @@
+/*
+ * This is only a stub file to make drivers not yet converted to the new
+ * PCI probing mechanism work. [mj]
+ */
+
+#ifndef BIOS32_H
+#define BIOS32_H
+
+#include <linux/pci.h>
+
+#warning This driver uses the old PCI interface, please fix it (see Documentation/pci.txt)
+
+extern inline int __pcibios_read_irq(unsigned char bus, unsigned char dev_fn, unsigned char *to)
+{
+ struct pci_dev *pdev = pci_find_slot(bus, dev_fn);
+ if (!pdev) {
+ *to = 0;
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ } else {
+ *to = pdev->irq;
+ return PCIBIOS_SUCCESSFUL;
+ }
+}
+
+extern inline int __pcibios_read_config_byte(unsigned char bus,
+ unsigned char dev_fn, unsigned char where, unsigned char *to)
+{
+ return pcibios_read_config_byte(bus, dev_fn, where, to);
+}
+
+#define pcibios_read_config_byte(b,d,w,p) \
+ (((w) == PCI_INTERRUPT_LINE) ? __pcibios_read_irq(b,d,p) : __pcibios_read_config_byte(b,d,w,p))
+
+#endif