patch-2.4.19 linux-2.4.19/arch/ppc/kernel/pci.c
Next file: linux-2.4.19/arch/ppc/kernel/pmac_feature.c
Previous file: linux-2.4.19/arch/ppc/kernel/misc.S
Back to the patch index
Back to the overall index
- Lines: 74
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/ppc/kernel/pci.c
- Orig date:
Mon Feb 25 11:37:55 2002
diff -urN linux-2.4.18/arch/ppc/kernel/pci.c linux-2.4.19/arch/ppc/kernel/pci.c
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.pci.c 1.40 01/25/02 15:15:24 benh
+ * BK Id: SCCS/s.pci.c 1.43 05/08/02 15:01:15 benh
*/
/*
* Common pmac/prep/chrp pci routines. -- Cort
@@ -46,6 +46,7 @@
static void pcibios_fixup_resources(struct pci_dev* dev);
static void fixup_broken_pcnet32(struct pci_dev* dev);
static void fixup_rev1_53c810(struct pci_dev* dev);
+static void fixup_cpc710_pci64(struct pci_dev* dev);
#ifdef CONFIG_ALL_PPC
static void pcibios_fixup_cardbus(struct pci_dev* dev);
static u8* pci_to_OF_bus_map;
@@ -64,6 +65,7 @@
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810 },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64},
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources },
#ifdef CONFIG_ALL_PPC
/* We should add per-machine fixup support in xxx_setup.c or xxx_pci.c */
@@ -95,6 +97,18 @@
}
}
+static void
+fixup_cpc710_pci64(struct pci_dev* dev)
+{
+ /* Hide the PCI64 BARs from the kernel as their content doesn't
+ * fit well in the resource management
+ */
+ dev->resource[0].start = dev->resource[0].end = 0;
+ dev->resource[0].flags = 0;
+ dev->resource[1].start = dev->resource[1].end = 0;
+ dev->resource[1].flags = 0;
+}
+
void
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
@@ -179,14 +193,24 @@
if (_machine != _MACH_Pmac)
return;
/*
- * Fix the interrupt routing on the TI1211 chip on the 1999
- * G3 powerbook, which doesn't get initialized properly by OF.
- * Same problem with the 1410 of the new titanium pbook which
- * has the same register.
+ * Fix the interrupt routing on the various cardbus bridges
+ * used on powerbooks
*/
- if (dev->vendor == PCI_VENDOR_ID_TI
- && (dev->device == PCI_DEVICE_ID_TI_1211 ||
- dev->device == PCI_DEVICE_ID_TI_1410)) {
+ if (dev->vendor != PCI_VENDOR_ID_TI)
+ return;
+ if (dev->device == PCI_DEVICE_ID_TI_1130 ||
+ dev->device == PCI_DEVICE_ID_TI_1131) {
+ u8 val;
+ /* Enable PCI interrupt */
+ if (pci_read_config_byte(dev, 0x91, &val) == 0)
+ pci_write_config_byte(dev, 0x91, val | 0x30);
+ /* Disable ISA interrupt mode */
+ if (pci_read_config_byte(dev, 0x92, &val) == 0)
+ pci_write_config_byte(dev, 0x92, val & ~0x06);
+ }
+ if (dev->device == PCI_DEVICE_ID_TI_1210 ||
+ dev->device == PCI_DEVICE_ID_TI_1211 ||
+ dev->device == PCI_DEVICE_ID_TI_1410) {
u8 val;
/* 0x8c == TI122X_IRQMUX, 2 says to route the INTA
signal out the MFUNC0 pin */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)