patch-2.3.40 linux/arch/arm/kernel/bios32.c
Next file: linux/arch/arm/kernel/bios32.h
Previous file: linux/arch/arm/kernel/armksyms.c
Back to the patch index
Back to the overall index
- Lines: 138
- Date:
Mon Jan 17 22:22:52 2000
- Orig file:
v2.3.39/linux/arch/arm/kernel/bios32.c
- Orig date:
Thu Jan 6 12:57:47 2000
diff -u --recursive --new-file v2.3.39/linux/arch/arm/kernel/bios32.c linux/arch/arm/kernel/bios32.c
@@ -5,6 +5,7 @@
*
* Bits taken from various places.
*/
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/errno.h>
@@ -33,8 +34,8 @@
continue;
pci_write_config_word(dev, PCI_STATUS, status & 0xf900);
- printk(KERN_DEBUG "PCI: status %04X on %s\n",
- status, dev->name);
+ printk(KERN_DEBUG "PCI: %02X:%02X: status %04X on %s\n",
+ dev->bus->number, dev->devfn, status, dev->name);
}
}
@@ -162,9 +163,10 @@
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
- struct pci_dev *dev;
+ struct list_head *walk = &bus->devices;
- for (dev = bus->devices; dev; dev = dev->sibling) {
+ for (walk = walk->next; walk != &bus->devices; walk = walk->next) {
+ struct pci_dev *dev = pci_dev_b(walk);
u16 cmd;
/*
@@ -220,6 +222,7 @@
return 0;
}
+#ifdef CONFIG_FOOTBRIDGE
/* ebsa285 host-specific stuff */
static int irqmap_ebsa285[] __initdata = { IRQ_IN1, IRQ_IN0, IRQ_PCI, IRQ_IN3 };
@@ -255,7 +258,7 @@
static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
if (dev->irq >= 128)
- return 16 + (dev->irq & 0x1f);
+ return dev->irq & 0x1f;
if (dev->irq >= 1 && dev->irq <= 4)
return irqmap_cats[dev->irq - 1];
@@ -313,17 +316,53 @@
no_swizzle,
netwinder_map_irq
};
+#endif
+
+#ifdef CONFIG_ARCH_NEXUSPCI
+/*
+ * Owing to a PCB cockup, issue A backplanes are wired thus:
+ *
+ * Slot 1 2 3 4 5 Bridge
+ * IRQ D C B A A
+ * A D C B B
+ * B A D C C
+ * C B A D D
+ *
+ * ID A31 A30 A29 A28 A27 A26
+ */
+
+static int irqmap_ftv[] __initdata = { IRQ_PCI_A, IRQ_PCI_B, IRQ_PCI_C, IRQ_PCI_D };
+
+static int __init ftv_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+ return irqmap_ftv[(slot + pin) & 3];
+}
+
+/* ftv host-specific stuff */
+static struct hw_pci ftv_pci __initdata = {
+ plx90x0_init,
+ 0x9000,
+ 0x00100000,
+ no_swizzle,
+ ftv_map_irq
+};
+#endif
void __init pcibios_init(void)
{
struct hw_pci *hw_pci = NULL;
+#ifdef CONFIG_FOOTBRIDGE
if (machine_is_ebsa285())
hw_pci = &ebsa285_pci;
else if (machine_is_cats())
hw_pci = &cats_pci;
else if (machine_is_netwinder())
hw_pci = &netwinder_pci;
+#endif
+#ifdef CONFIG_ARCH_NEXUSPCI
+ hw_pci = &ftv_pci;
+#endif
if (hw_pci == NULL)
return;
@@ -346,12 +385,14 @@
pci_fixup_irqs(hw_pci->swizzle, hw_pci->map_irq);
pci_set_bus_ranges();
+#ifdef CONFIG_FOOTBRIDGE
/*
* Initialise any other hardware after we've got the PCI bus
* initialised. We may need the PCI bus to talk to this other
* hardware.
*/
hw_init();
+#endif
}
char * __init pcibios_setup(char *str)
@@ -363,7 +404,17 @@
return str;
}
-void __init
-pcibios_align_resource(void *data, struct resource *res, unsigned long size)
+/*
+ * Assign new address to PCI resource. We hope our resource information
+ * is complete.
+ *
+ * Expects start=0, end=size-1, flags=resource type.
+ */
+int pci_assign_resource(struct pci_dev *dev, int i)
+{
+ return 0;
+}
+
+void pcibios_align_resource(void *data, struct resource *res, unsigned long size)
{
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)