Commit a979ace6 authored by Deepak Saxena's avatar Deepak Saxena

Merge bk://linux.bkbits.net/linux-2.5

into plexity.net:/home/dsaxena/src/linux-2.5-bk
parents 4a6d387e 14287c83
...@@ -67,6 +67,7 @@ quirk_isa_bridge(struct pci_dev *dev) ...@@ -67,6 +67,7 @@ quirk_isa_bridge(struct pci_dev *dev)
{ {
dev->class = PCI_CLASS_BRIDGE_ISA << 8; dev->class = PCI_CLASS_BRIDGE_ISA << 8;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);
static void __init static void __init
quirk_cypress(struct pci_dev *dev) quirk_cypress(struct pci_dev *dev)
...@@ -100,6 +101,7 @@ quirk_cypress(struct pci_dev *dev) ...@@ -100,6 +101,7 @@ quirk_cypress(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);
/* Called for each device after PCI setup is done. */ /* Called for each device after PCI setup is done. */
static void __init static void __init
...@@ -112,17 +114,10 @@ pcibios_fixup_final(struct pci_dev *dev) ...@@ -112,17 +114,10 @@ pcibios_fixup_final(struct pci_dev *dev)
isa_bridge = dev; isa_bridge = dev;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_final);
struct pci_fixup pcibios_fixups[] __initdata = { /* Just declaring that the power-of-ten prefixes are actually the
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, power-of-two ones doesn't make it true :) */
quirk_isa_bridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693,
quirk_cypress },
{ PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID,
pcibios_fixup_final },
{ 0 }
};
#define KB 1024 #define KB 1024
#define MB (1024*KB) #define MB (1024*KB)
#define GB (1024*MB) #define GB (1024*MB)
......
...@@ -128,12 +128,14 @@ static void __devinit pci_fixup_83c553(struct pci_dev *dev) ...@@ -128,12 +128,14 @@ static void __devinit pci_fixup_83c553(struct pci_dev *dev)
pci_write_config_word(dev, 0x44, 0xb000); pci_write_config_word(dev, 0x44, 0xb000);
outb(0x08, 0x4d1); outb(0x08, 0x4d1);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553);
static void __devinit pci_fixup_unassign(struct pci_dev *dev) static void __devinit pci_fixup_unassign(struct pci_dev *dev)
{ {
dev->resource[0].end -= dev->resource[0].start; dev->resource[0].end -= dev->resource[0].start;
dev->resource[0].start = 0; dev->resource[0].start = 0;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940F, pci_fixup_unassign);
/* /*
* Prevent the PCI layer from seeing the resources allocated to this device * Prevent the PCI layer from seeing the resources allocated to this device
...@@ -154,6 +156,7 @@ static void __devinit pci_fixup_dec21285(struct pci_dev *dev) ...@@ -154,6 +156,7 @@ static void __devinit pci_fixup_dec21285(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, pci_fixup_dec21285);
/* /*
* Same as above. The PrPMC800 carrier board for the PrPMC1100 * Same as above. The PrPMC800 carrier board for the PrPMC1100
...@@ -178,6 +181,7 @@ static void __devinit pci_fixup_prpmc1100(struct pci_dev *dev) ...@@ -178,6 +181,7 @@ static void __devinit pci_fixup_prpmc1100(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP4XX, pci_fixup_prpmc1100);
/* /*
* PCI IDE controllers use non-standard I/O port decoding, respect it. * PCI IDE controllers use non-standard I/O port decoding, respect it.
...@@ -198,6 +202,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *dev) ...@@ -198,6 +202,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
/* /*
* Put the DEC21142 to sleep * Put the DEC21142 to sleep
...@@ -206,6 +211,7 @@ static void __devinit pci_fixup_dec21142(struct pci_dev *dev) ...@@ -206,6 +211,7 @@ static void __devinit pci_fixup_dec21142(struct pci_dev *dev)
{ {
pci_write_config_dword(dev, 0x40, 0x80000000); pci_write_config_dword(dev, 0x40, 0x80000000);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, pci_fixup_dec21142);
/* /*
* The CY82C693 needs some rather major fixups to ensure that it does * The CY82C693 needs some rather major fixups to ensure that it does
...@@ -271,38 +277,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) ...@@ -271,38 +277,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
pci_write_config_byte(dev, 0x45, 0x03); pci_write_config_byte(dev, 0x45, 0x03);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
struct pci_fixup pcibios_fixups[] = {
{
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693,
pci_fixup_cy82c693
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142,
pci_fixup_dec21142
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285,
pci_fixup_dec21285
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553,
pci_fixup_83c553
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940F,
pci_fixup_unassign
}, {
PCI_FIXUP_HEADER,
PCI_ANY_ID, PCI_ANY_ID,
pci_fixup_ide_bases
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP4XX,
pci_fixup_prpmc1100
}, { 0 }
};
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq) void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{ {
......
...@@ -29,6 +29,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) ...@@ -29,6 +29,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d)
} }
pcibios_last_bus = -1; pcibios_last_bus = -1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx);
static void __devinit pci_fixup_i450gx(struct pci_dev *d) static void __devinit pci_fixup_i450gx(struct pci_dev *d)
{ {
...@@ -42,6 +43,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d) ...@@ -42,6 +43,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d)
pci_scan_bus(busno, &pci_root_ops, NULL); pci_scan_bus(busno, &pci_root_ops, NULL);
pcibios_last_bus = -1; pcibios_last_bus = -1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx);
static void __devinit pci_fixup_umc_ide(struct pci_dev *d) static void __devinit pci_fixup_umc_ide(struct pci_dev *d)
{ {
...@@ -55,6 +57,7 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d) ...@@ -55,6 +57,7 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d)
for(i=0; i<4; i++) for(i=0; i<4; i++)
d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide);
static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) static void __devinit pci_fixup_ncr53c810(struct pci_dev *d)
{ {
...@@ -67,6 +70,7 @@ static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) ...@@ -67,6 +70,7 @@ static void __devinit pci_fixup_ncr53c810(struct pci_dev *d)
d->class = PCI_CLASS_STORAGE_SCSI << 8; d->class = PCI_CLASS_STORAGE_SCSI << 8;
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810);
static void __devinit pci_fixup_ide_bases(struct pci_dev *d) static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
{ {
...@@ -86,6 +90,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d) ...@@ -86,6 +90,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
static void __devinit pci_fixup_ide_trash(struct pci_dev *d) static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
{ {
...@@ -108,6 +113,10 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d) ...@@ -108,6 +113,10 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
for(i=0; i<4; i++) for(i=0; i<4; i++)
d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, pci_fixup_ide_trash);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, pci_fixup_ide_trash);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_11, pci_fixup_ide_trash);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_9, pci_fixup_ide_trash);
static void __devinit pci_fixup_latency(struct pci_dev *d) static void __devinit pci_fixup_latency(struct pci_dev *d)
{ {
...@@ -118,6 +127,8 @@ static void __devinit pci_fixup_latency(struct pci_dev *d) ...@@ -118,6 +127,8 @@ static void __devinit pci_fixup_latency(struct pci_dev *d)
DBG("PCI: Setting max latency to 32\n"); DBG("PCI: Setting max latency to 32\n");
pcibios_max_latency = 32; pcibios_max_latency = 32;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency);
static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d)
{ {
...@@ -126,6 +137,7 @@ static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) ...@@ -126,6 +137,7 @@ static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d)
*/ */
d->irq = 9; d->irq = 9;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci_fixup_piix4_acpi);
/* /*
* Addresses issues with problems in the memory write queue timer in * Addresses issues with problems in the memory write queue timer in
...@@ -179,6 +191,10 @@ static void __devinit pci_fixup_via_northbridge_bug(struct pci_dev *d) ...@@ -179,6 +191,10 @@ static void __devinit pci_fixup_via_northbridge_bug(struct pci_dev *d)
pci_write_config_byte(d, where, v); pci_write_config_byte(d, where, v);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
/* /*
* For some reasons Intel decided that certain parts of their * For some reasons Intel decided that certain parts of their
...@@ -195,6 +211,7 @@ static void __devinit pci_fixup_transparent_bridge(struct pci_dev *dev) ...@@ -195,6 +211,7 @@ static void __devinit pci_fixup_transparent_bridge(struct pci_dev *dev)
(dev->device & 0xff00) == 0x2400) (dev->device & 0xff00) == 0x2400)
dev->transparent = 1; dev->transparent = 1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_bridge);
/* /*
* Fixup for C1 Halt Disconnect problem on nForce2 systems. * Fixup for C1 Halt Disconnect problem on nForce2 systems.
...@@ -236,115 +253,5 @@ static void __init pci_fixup_nforce2(struct pci_dev *dev) ...@@ -236,115 +253,5 @@ static void __init pci_fixup_nforce2(struct pci_dev *dev)
pci_write_config_dword(dev, 0x6c, fixed_val); pci_write_config_dword(dev, 0x6c, fixed_val);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
struct pci_fixup pcibios_fixups[] = {
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82451NX,
.hook = pci_fixup_i450nx
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82454GX,
.hook = pci_fixup_i450gx
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_UMC,
.device = PCI_DEVICE_ID_UMC_UM8886BF,
.hook = pci_fixup_umc_ide
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_SI,
.device = PCI_DEVICE_ID_SI_5513,
.hook = pci_fixup_ide_trash
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_ANY_ID,
.device = PCI_ANY_ID,
.hook = pci_fixup_ide_bases
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_SI,
.device = PCI_DEVICE_ID_SI_5597,
.hook = pci_fixup_latency
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_SI,
.device = PCI_DEVICE_ID_SI_5598,
.hook = pci_fixup_latency
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82371AB_3,
.hook = pci_fixup_piix4_acpi
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801CA_10,
.hook = pci_fixup_ide_trash
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801CA_11,
.hook = pci_fixup_ide_trash
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801DB_9,
.hook = pci_fixup_ide_trash
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_8363_0,
.hook = pci_fixup_via_northbridge_bug
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_8622,
.hook = pci_fixup_via_northbridge_bug
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_8361,
.hook = pci_fixup_via_northbridge_bug
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_8367_0,
.hook = pci_fixup_via_northbridge_bug
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_NCR,
.device = PCI_DEVICE_ID_NCR_53C810,
.hook = pci_fixup_ncr53c810
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_ANY_ID,
.hook = pci_fixup_transparent_bridge
},
{
.pass = PCI_FIXUP_HEADER,
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE2,
.hook = pci_fixup_nforce2
},
{ .pass = 0 }
};
...@@ -100,10 +100,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) ...@@ -100,10 +100,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d)
} }
pcibios_last_bus = -1; pcibios_last_bus = -1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx);
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx },
};
static int __init pci_numa_init(void) static int __init pci_numa_init(void)
{ {
......
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
#define DBG(x...) #define DBG(x...)
#endif #endif
struct pci_fixup pcibios_fixups[1];
/* /*
* Low-level SAL-based PCI configuration access functions. Note that SAL * Low-level SAL-based PCI configuration access functions. Note that SAL
* calls are already serialized (via sal_lock), so we don't need another * calls are already serialized (via sal_lock), so we don't need another
......
...@@ -77,11 +77,6 @@ static int disable_pci_burst; /* If set do not allow PCI bursts. */ ...@@ -77,11 +77,6 @@ static int disable_pci_burst; /* If set do not allow PCI bursts. */
static unsigned int io_base; static unsigned int io_base;
static unsigned int mem_base; static unsigned int mem_base;
struct pci_fixup pcibios_fixups[] =
{
{ 0 }
};
/* /*
* static void disable_dev(struct pci_dev *dev) * static void disable_dev(struct pci_dev *dev)
* *
......
...@@ -351,8 +351,6 @@ char *pcibios_setup(char *option) ...@@ -351,8 +351,6 @@ char *pcibios_setup(char *option)
} }
/*****************************************************************************/ /*****************************************************************************/
struct pci_fixup pcibios_fixups[] = { { 0 } };
void pcibios_fixup_bus(struct pci_bus *b) void pcibios_fixup_bus(struct pci_bus *b)
{ {
} }
......
...@@ -60,13 +60,7 @@ static void atlas_saa9730_base_fixup (struct pci_dev *pdev) ...@@ -60,13 +60,7 @@ static void atlas_saa9730_base_fixup (struct pci_dev *pdev)
printk ("saa9730_base = %x\n", saa9730_base); printk ("saa9730_base = %x\n", saa9730_base);
} }
#endif DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9730,
atlas_saa9730_base_fixup);
struct pci_fixup pcibios_fixups[] __initdata = {
#ifdef CONFIG_KGDB
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9730,
atlas_saa9730_base_fixup},
#endif #endif
{ 0 }
};
...@@ -102,7 +102,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -102,7 +102,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ {
return irq_tab_alchemy[slot][pin]; return irq_tab_alchemy[slot][pin];
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ 0 }
};
...@@ -42,7 +42,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -42,7 +42,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ {
return irq_tab_capcella[slot][pin]; return irq_tab_capcella[slot][pin];
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ .pass = 0, },
};
...@@ -41,6 +41,9 @@ static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev) ...@@ -41,6 +41,9 @@ static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 7); pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 7);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
qube_raq_via_bmIDE_fixup);
static void qube_raq_galileo_fixup(struct pci_dev *dev) static void qube_raq_galileo_fixup(struct pci_dev *dev)
{ {
unsigned short galileo_id; unsigned short galileo_id;
...@@ -73,13 +76,8 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev) ...@@ -73,13 +76,8 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev)
} }
} }
struct pci_fixup pcibios_fixups[] __initdata = { DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_GALILEO, PCI_ANY_ID,
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, qube_raq_galileo_fixup);
qube_raq_via_bmIDE_fixup},
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_GALILEO, PCI_ANY_ID,
qube_raq_galileo_fixup},
0
};
static char irq_tab_cobalt[] __initdata = { static char irq_tab_cobalt[] __initdata = {
[COBALT_PCICONF_CPU] = 0, [COBALT_PCICONF_CPU] = 0,
......
...@@ -17,8 +17,5 @@ static void ddb5074_fixup(struct pci_dev *dev) ...@@ -17,8 +17,5 @@ static void ddb5074_fixup(struct pci_dev *dev)
pci_write_config_byte(dev, 0x7e, t8); pci_write_config_byte(dev, 0x7e, t8);
} }
struct pci_fixup pcibios_fixups[] __initdata = { DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, ddb5074_fixup);
ddb5074_fixup },
{0}
};
...@@ -41,6 +41,11 @@ static void ddb5477_fixup(struct pci_dev *dev) ...@@ -41,6 +41,11 @@ static void ddb5477_fixup(struct pci_dev *dev)
pci_write_config_byte(dev, 0x41, old | 0xd0); pci_write_config_byte(dev, 0x41, old | 0xd0);
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533,
ddb5477_fixup);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1535,
ddb5477_fixup);
/* /*
* Fixup baseboard AMD chip so that tx does not underflow. * Fixup baseboard AMD chip so that tx does not underflow.
* bcr_18 |= 0x0800 * bcr_18 |= 0x0800
...@@ -69,12 +74,5 @@ static void ddb5477_amd_lance_fixup(struct pci_dev *dev) ...@@ -69,12 +74,5 @@ static void ddb5477_amd_lance_fixup(struct pci_dev *dev)
outw(temp, ioaddr + PCNET32_WIO_BDP); outw(temp, ioaddr + PCNET32_WIO_BDP);
} }
struct pci_fixup pcibios_fixups[] __initdata = { DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE,
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, ddb5477_amd_lance_fixup);
ddb5477_fixup },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1535,
ddb5477_fixup },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE,
ddb5477_amd_lance_fixup },
{0}
};
...@@ -44,7 +44,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -44,7 +44,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ {
return irq_tab_mace[slot][pin]; return irq_tab_mace[slot][pin];
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -36,7 +36,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -36,7 +36,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return 0; return 0;
panic("Whooops in pcibios_map_irq"); panic("Whooops in pcibios_map_irq");
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -4,7 +4,3 @@ ...@@ -4,7 +4,3 @@
void __init pcibios_fixup_irqs(void) void __init pcibios_fixup_irqs(void)
{ {
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ 0 }
};
...@@ -79,6 +79,8 @@ static void __init malta_piix_func0_fixup(struct pci_dev *pdev) ...@@ -79,6 +79,8 @@ static void __init malta_piix_func0_fixup(struct pci_dev *pdev)
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0,
malta_piix_func0_fixup);
static void __init malta_piix_func1_fixup(struct pci_dev *pdev) static void __init malta_piix_func1_fixup(struct pci_dev *pdev)
{ {
...@@ -96,10 +98,5 @@ static void __init malta_piix_func1_fixup(struct pci_dev *pdev) ...@@ -96,10 +98,5 @@ static void __init malta_piix_func1_fixup(struct pci_dev *pdev)
} }
} }
struct pci_fixup pcibios_fixups[] __initdata = { DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB,
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, malta_piix_func1_fixup);
malta_piix_func0_fixup},
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB,
malta_piix_func1_fixup},
{ 0 }
};
...@@ -42,7 +42,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -42,7 +42,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return irq_tab_mpc30x[slot]; return irq_tab_mpc30x[slot];
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ .pass = 0, },
};
...@@ -33,7 +33,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -33,7 +33,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return 0; return 0;
panic("Whooops in pcibios_map_irq"); panic("Whooops in pcibios_map_irq");
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -29,7 +29,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -29,7 +29,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return -1; return -1;
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -82,7 +82,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -82,7 +82,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return irq_tab_rm200[slot][pin]; return irq_tab_rm200[slot][pin];
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -58,7 +58,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -58,7 +58,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return irq; return irq;
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ .pass = 0, },
};
...@@ -77,7 +77,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -77,7 +77,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return irq; return irq;
} }
struct pci_fixup pcibios_fixups[] __initdata = {
{ .pass = 0, },
};
...@@ -33,7 +33,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -33,7 +33,3 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return 3; /* Everything goes to one irq bit */ return 3; /* Everything goes to one irq bit */
} }
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -329,6 +329,9 @@ static void __init pci_fixup_ioc3(struct pci_dev *d) ...@@ -329,6 +329,9 @@ static void __init pci_fixup_ioc3(struct pci_dev *d)
pci_disable_swapping(d); pci_disable_swapping(d);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
pci_fixup_ioc3);
static void __init pci_fixup_isp1020(struct pci_dev *d) static void __init pci_fixup_isp1020(struct pci_dev *d)
{ {
struct bridge_controller *bc = BRIDGE_CONTROLLER(d->bus); struct bridge_controller *bc = BRIDGE_CONTROLLER(d->bus);
...@@ -353,6 +356,9 @@ static void __init pci_fixup_isp1020(struct pci_dev *d) ...@@ -353,6 +356,9 @@ static void __init pci_fixup_isp1020(struct pci_dev *d)
pci_enable_swapping(d); pci_enable_swapping(d);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020,
pci_fixup_isp1020);
static void __init pci_fixup_isp2x00(struct pci_dev *d) static void __init pci_fixup_isp2x00(struct pci_dev *d)
{ {
struct bridge_controller *bc = BRIDGE_CONTROLLER(d->bus); struct bridge_controller *bc = BRIDGE_CONTROLLER(d->bus);
...@@ -427,14 +433,7 @@ static void __init pci_fixup_isp2x00(struct pci_dev *d) ...@@ -427,14 +433,7 @@ static void __init pci_fixup_isp2x00(struct pci_dev *d)
/*d->resource[1].flags |= 1; */ /*d->resource[1].flags |= 1; */
} }
struct pci_fixup pcibios_fixups[] = { DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100,
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3, pci_fixup_isp2x00);
pci_fixup_ioc3}, DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200,
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020, pci_fixup_isp2x00);
pci_fixup_isp1020},
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100,
pci_fixup_isp2x00},
{PCI_FIXUP_HEADER, PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200,
pci_fixup_isp2x00},
{0}
};
...@@ -279,7 +279,3 @@ static int __init sb1250_pcibios_init(void) ...@@ -279,7 +279,3 @@ static int __init sb1250_pcibios_init(void)
return 0; return 0;
} }
arch_initcall(sb1250_pcibios_init); arch_initcall(sb1250_pcibios_init);
struct pci_fixup pcibios_fixups[] = {
{0}
};
...@@ -414,11 +414,6 @@ struct pci_ops titan_pci_ops = { ...@@ -414,11 +414,6 @@ struct pci_ops titan_pci_ops = {
titan_ht_config_write_dword titan_ht_config_write_dword
}; };
struct pci_fixup pcibios_fixups[] = {
{0}
};
void __init pcibios_fixup_bus(struct pci_bus *c) void __init pcibios_fixup_bus(struct pci_bus *c)
{ {
titan_ht_pcibios_fixup_bus(c); titan_ht_pcibios_fixup_bus(c);
......
...@@ -146,15 +146,6 @@ char *pcibios_setup(char *str) ...@@ -146,15 +146,6 @@ char *pcibios_setup(char *str)
return str; return str;
} }
/* Used in drivers/pci/quirks.c */
struct pci_fixup pcibios_fixups[] = {
#ifdef CONFIG_SUPERIO
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci },
#endif
{ 0 }
};
/* /*
* Called by pci_set_master() - a driver interface. * Called by pci_set_master() - a driver interface.
* *
......
...@@ -45,11 +45,6 @@ static void fixup_broken_pcnet32(struct pci_dev* dev); ...@@ -45,11 +45,6 @@ static void fixup_broken_pcnet32(struct pci_dev* dev);
static int reparent_resources(struct resource *parent, struct resource *res); static int reparent_resources(struct resource *parent, struct resource *res);
static void fixup_rev1_53c810(struct pci_dev* dev); static void fixup_rev1_53c810(struct pci_dev* dev);
static void fixup_cpc710_pci64(struct pci_dev* dev); static void fixup_cpc710_pci64(struct pci_dev* dev);
#ifdef CONFIG_PPC_PMAC
extern void pmac_pci_fixup_cardbus(struct pci_dev* dev);
extern void pmac_pci_fixup_pciata(struct pci_dev* dev);
extern void pmac_pci_fixup_k2_sata(struct pci_dev* dev);
#endif
#ifdef CONFIG_PPC_OF #ifdef CONFIG_PPC_OF
static u8* pci_to_OF_bus_map; static u8* pci_to_OF_bus_map;
#endif #endif
...@@ -64,20 +59,6 @@ struct pci_controller** hose_tail = &hose_head; ...@@ -64,20 +59,6 @@ struct pci_controller** hose_tail = &hose_head;
static int pci_bus_count; static int pci_bus_count;
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_PPC_PMAC
/* We should add per-machine fixup support in xxx_setup.c or xxx_pci.c */
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_TI, PCI_ANY_ID, pmac_pci_fixup_cardbus },
{ PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SERVERWORKS, 0x0240, pmac_pci_fixup_k2_sata },
#endif /* CONFIG_PPC_PMAC */
{ 0 }
};
static void static void
fixup_rev1_53c810(struct pci_dev* dev) fixup_rev1_53c810(struct pci_dev* dev)
{ {
...@@ -90,6 +71,7 @@ fixup_rev1_53c810(struct pci_dev* dev) ...@@ -90,6 +71,7 @@ fixup_rev1_53c810(struct pci_dev* dev)
dev->class = PCI_CLASS_STORAGE_SCSI; dev->class = PCI_CLASS_STORAGE_SCSI;
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
static void static void
fixup_broken_pcnet32(struct pci_dev* dev) fixup_broken_pcnet32(struct pci_dev* dev)
...@@ -100,6 +82,7 @@ fixup_broken_pcnet32(struct pci_dev* dev) ...@@ -100,6 +82,7 @@ fixup_broken_pcnet32(struct pci_dev* dev)
pci_name_device(dev); pci_name_device(dev);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
static void static void
fixup_cpc710_pci64(struct pci_dev* dev) fixup_cpc710_pci64(struct pci_dev* dev)
...@@ -112,6 +95,7 @@ fixup_cpc710_pci64(struct pci_dev* dev) ...@@ -112,6 +95,7 @@ fixup_cpc710_pci64(struct pci_dev* dev)
dev->resource[1].start = dev->resource[1].end = 0; dev->resource[1].start = dev->resource[1].end = 0;
dev->resource[1].flags = 0; dev->resource[1].flags = 0;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
static void static void
pcibios_fixup_resources(struct pci_dev *dev) pcibios_fixup_resources(struct pci_dev *dev)
...@@ -158,6 +142,7 @@ pcibios_fixup_resources(struct pci_dev *dev) ...@@ -158,6 +142,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
if (ppc_md.pcibios_fixup_resources) if (ppc_md.pcibios_fixup_resources)
ppc_md.pcibios_fixup_resources(dev); ppc_md.pcibios_fixup_resources(dev);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
void void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
......
...@@ -1034,6 +1034,8 @@ void pmac_pci_fixup_cardbus(struct pci_dev* dev) ...@@ -1034,6 +1034,8 @@ void pmac_pci_fixup_cardbus(struct pci_dev* dev)
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TI, PCI_ANY_ID, pmac_pci_fixup_cardbus);
void pmac_pci_fixup_pciata(struct pci_dev* dev) void pmac_pci_fixup_pciata(struct pci_dev* dev)
{ {
u8 progif = 0; u8 progif = 0;
...@@ -1074,6 +1076,8 @@ void pmac_pci_fixup_pciata(struct pci_dev* dev) ...@@ -1074,6 +1076,8 @@ void pmac_pci_fixup_pciata(struct pci_dev* dev)
printk(KERN_ERR "Rewrite of PROGIF failed !\n"); printk(KERN_ERR "Rewrite of PROGIF failed !\n");
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
/* /*
* Disable second function on K2-SATA, it's broken * Disable second function on K2-SATA, it's broken
...@@ -1104,3 +1108,4 @@ void __pmac pmac_pci_fixup_k2_sata(struct pci_dev* dev) ...@@ -1104,3 +1108,4 @@ void __pmac pmac_pci_fixup_k2_sata(struct pci_dev* dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, pmac_pci_fixup_k2_sata);
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/pci.h>
#include <asm/mpc8260.h> #include <asm/mpc8260.h>
#include <asm/machdep.h> #include <asm/machdep.h>
...@@ -237,6 +238,25 @@ static int sbc82xx_pci_map_irq(struct pci_dev *dev, unsigned char idsel, ...@@ -237,6 +238,25 @@ static int sbc82xx_pci_map_irq(struct pci_dev *dev, unsigned char idsel,
} }
static void __devinit quirk_sbc8260_cardbus(struct pci_dev *pdev)
{
uint32_t ctrl;
if (pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(17, 0))
return;
printk(KERN_INFO "Setting up CardBus controller\n");
/* Set P2CCLK bit in System Control Register */
pci_read_config_dword(pdev, 0x80, &ctrl);
ctrl |= (1<<27);
pci_write_config_dword(pdev, 0x80, ctrl);
/* Set MFUNC up for PCI IRQ routing via INTA and INTB, and LEDs. */
pci_write_config_dword(pdev, 0x8c, 0x00c01d22);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420, quirk_sbc8260_cardbus);
void __init void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5, platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
......
...@@ -820,7 +820,3 @@ void iSeries_Write_Long(u32 data, void *IoAddress) ...@@ -820,7 +820,3 @@ void iSeries_Write_Long(u32 data, void *IoAddress)
} while (CheckReturnCode("WWL", DevNode, rc) != 0); } while (CheckReturnCode("WWL", DevNode, rc) != 0);
} }
EXPORT_SYMBOL(iSeries_Write_Long); EXPORT_SYMBOL(iSeries_Write_Long);
void pcibios_name_device(struct pci_dev *dev)
{
}
...@@ -519,9 +519,9 @@ unsigned long __init find_and_init_phbs(void) ...@@ -519,9 +519,9 @@ unsigned long __init find_and_init_phbs(void)
return 0; return 0;
} }
#if 0
void pcibios_name_device(struct pci_dev *dev) void pcibios_name_device(struct pci_dev *dev)
{ {
#if 0
struct device_node *dn; struct device_node *dn;
/* /*
...@@ -541,8 +541,9 @@ void pcibios_name_device(struct pci_dev *dev) ...@@ -541,8 +541,9 @@ void pcibios_name_device(struct pci_dev *dev)
} }
} }
} }
#endif
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device);
#endif
void __devinit pcibios_fixup_device_resources(struct pci_dev *dev, void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
struct pci_bus *bus) struct pci_bus *bus)
......
...@@ -55,12 +55,6 @@ unsigned int pcibios_assign_all_busses(void) ...@@ -55,12 +55,6 @@ unsigned int pcibios_assign_all_busses(void)
unsigned long isa_io_base; /* NULL if no ISA bus */ unsigned long isa_io_base; /* NULL if no ISA bus */
unsigned long pci_io_base; unsigned long pci_io_base;
void pcibios_name_device(struct pci_dev* dev);
void pcibios_final_fixup(void);
static void fixup_broken_pcnet32(struct pci_dev* dev);
static void fixup_windbond_82c105(struct pci_dev* dev);
extern void fixup_k2_sata(struct pci_dev* dev);
void iSeries_pcibios_init(void); void iSeries_pcibios_init(void);
struct pci_controller *hose_head; struct pci_controller *hose_head;
...@@ -74,20 +68,6 @@ int global_phb_number; /* Global phb counter */ ...@@ -74,20 +68,6 @@ int global_phb_number; /* Global phb counter */
/* Cached ISA bridge dev. */ /* Cached ISA bridge dev. */
struct pci_dev *ppc64_isabridge_dev = NULL; struct pci_dev *ppc64_isabridge_dev = NULL;
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID,
fixup_broken_pcnet32 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
fixup_windbond_82c105 },
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID,
pcibios_name_device },
#ifdef CONFIG_PPC_PMAC
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SERVERWORKS, 0x0240,
fixup_k2_sata },
#endif
{ 0 }
};
static void fixup_broken_pcnet32(struct pci_dev* dev) static void fixup_broken_pcnet32(struct pci_dev* dev)
{ {
if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
...@@ -96,6 +76,7 @@ static void fixup_broken_pcnet32(struct pci_dev* dev) ...@@ -96,6 +76,7 @@ static void fixup_broken_pcnet32(struct pci_dev* dev)
pci_name_device(dev); pci_name_device(dev);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
static void fixup_windbond_82c105(struct pci_dev* dev) static void fixup_windbond_82c105(struct pci_dev* dev)
{ {
...@@ -118,6 +99,7 @@ static void fixup_windbond_82c105(struct pci_dev* dev) ...@@ -118,6 +99,7 @@ static void fixup_windbond_82c105(struct pci_dev* dev)
dev->resource[i].flags &= ~IORESOURCE_IO; dev->resource[i].flags &= ~IORESOURCE_IO;
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, fixup_windbond_82c105);
void void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
......
...@@ -777,3 +777,4 @@ void fixup_k2_sata(struct pci_dev* dev) ...@@ -777,3 +777,4 @@ void fixup_k2_sata(struct pci_dev* dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata);
...@@ -176,14 +176,7 @@ static void __devinit quirk_ali_ide_ports(struct pci_dev *dev) ...@@ -176,14 +176,7 @@ static void __devinit quirk_ali_ide_ports(struct pci_dev *dev)
dev->resource[4].end = 0xf00f; dev->resource[4].end = 0xf00f;
dev->resource[4].flags = IORESOURCE_IO; dev->resource[4].flags = IORESOURCE_IO;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, quirk_ali_ide_ports);
/* Add future fixups here... */
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL,
PCI_DEVICE_ID_AL_M5229, quirk_ali_ide_ports },
{ 0 }
};
char * __devinit pcibios_setup(char *str) char * __devinit pcibios_setup(char *str)
{ {
......
...@@ -455,13 +455,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) ...@@ -455,13 +455,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
/* Add future fixups here... */
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases },
{ 0 }
};
void __init pcibios_init(void) void __init pcibios_init(void)
{ {
......
...@@ -47,11 +47,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev) ...@@ -47,11 +47,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev)
} }
} }
struct pci_fixup pcibios_fixups[] = { DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources);
{ PCI_FIXUP_HEADER, PCI_ANY_ID,
PCI_ANY_ID, gapspci_fixup_resources },
{ 0, }
};
void __init pcibios_fixup_bus(struct pci_bus *bus) void __init pcibios_fixup_bus(struct pci_bus *bus)
{ {
......
...@@ -177,16 +177,9 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) ...@@ -177,16 +177,9 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
#endif #endif
/* Add future fixups here... */
struct pci_fixup pcibios_fixups[] = {
#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases },
#endif
{ 0 }
};
/* /*
* Called after each bus is probed, but before its children * Called after each bus is probed, but before its children
* are examined. * are examined.
......
...@@ -160,13 +160,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) ...@@ -160,13 +160,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
/* Add future fixups here... */
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases },
{ 0 }
};
int __init st40pci_init(unsigned memStart, unsigned memSize) int __init st40pci_init(unsigned memStart, unsigned memSize)
{ {
......
...@@ -48,12 +48,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) ...@@ -48,12 +48,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
/* Add future fixups here... */
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases },
{ 0 }
};
char * __init pcibios_setup(char *str) char * __init pcibios_setup(char *str)
{ {
......
...@@ -36,10 +36,6 @@ ...@@ -36,10 +36,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
struct pci_fixup pcibios_fixups[] = {
{ 0 }
};
unsigned int pcic_pin_to_irq(unsigned int pin, char *name); unsigned int pcic_pin_to_irq(unsigned int pin, char *name);
/* /*
......
...@@ -351,10 +351,6 @@ static int __init pcibios_init(void) ...@@ -351,10 +351,6 @@ static int __init pcibios_init(void)
subsys_initcall(pcibios_init); subsys_initcall(pcibios_init);
struct pci_fixup pcibios_fixups[] = {
{ 0 }
};
void pcibios_fixup_bus(struct pci_bus *pbus) void pcibios_fixup_bus(struct pci_bus *pbus)
{ {
struct pci_pbm_info *pbm = pbus->sysdata; struct pci_pbm_info *pbm = pbus->sysdata;
......
...@@ -322,8 +322,6 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, ...@@ -322,8 +322,6 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
/* Stubs for things we don't use. */ /* Stubs for things we don't use. */
struct pci_fixup pcibios_fixups[] = { { 0 } };
/* Called after each bus is probed, but before its children are examined. */ /* Called after each bus is probed, but before its children are examined. */
void pcibios_fixup_bus(struct pci_bus *b) void pcibios_fixup_bus(struct pci_bus *b)
{ {
......
...@@ -480,6 +480,7 @@ void superio_fixup_pci(struct pci_dev *pdev) ...@@ -480,6 +480,7 @@ void superio_fixup_pci(struct pci_dev *pdev)
pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog); pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
printk("PCI: Enabled native mode for NS87415 (pif=0x%x)\n", prog); printk("PCI: Enabled native mode for NS87415 (pif=0x%x)\n", prog);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci);
/* Because of a defect in Super I/O, all reads of the PCI DMA status /* Because of a defect in Super I/O, all reads of the PCI DMA status
* registers, IDE status register and the IDE select register need to be * registers, IDE status register and the IDE select register need to be
......
...@@ -39,6 +39,7 @@ static void __devinit quirk_passive_release(struct pci_dev *dev) ...@@ -39,6 +39,7 @@ static void __devinit quirk_passive_release(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_passive_release );
/* The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround /* The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround
but VIA don't answer queries. If you happen to have good contacts at VIA but VIA don't answer queries. If you happen to have good contacts at VIA
...@@ -57,6 +58,17 @@ static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) ...@@ -57,6 +58,17 @@ static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev)
printk(KERN_INFO "Activating ISA DMA hang workarounds.\n"); printk(KERN_INFO "Activating ISA DMA hang workarounds.\n");
} }
} }
/*
* Its not totally clear which chipsets are the problematic ones
* We know 82C586 and 82C596 variants are affected.
*/
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs );
int pci_pci_problems; int pci_pci_problems;
...@@ -72,6 +84,8 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev) ...@@ -72,6 +84,8 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_FAIL; pci_pci_problems|=PCIPCI_FAIL;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci );
/* /*
* Triton requires workarounds to be used by the drivers * Triton requires workarounds to be used by the drivers
...@@ -85,6 +99,10 @@ static void __devinit quirk_triton(struct pci_dev *dev) ...@@ -85,6 +99,10 @@ static void __devinit quirk_triton(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_TRITON; pci_pci_problems|=PCIPCI_TRITON;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, quirk_triton );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437VX, quirk_triton );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82439, quirk_triton );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82439TX, quirk_triton );
/* /*
* VIA Apollo KT133 needs PCI latency patch * VIA Apollo KT133 needs PCI latency patch
...@@ -145,6 +163,9 @@ static void __devinit quirk_vialatency(struct pci_dev *dev) ...@@ -145,6 +163,9 @@ static void __devinit quirk_vialatency(struct pci_dev *dev)
pci_write_config_byte(dev, 0x76, busarb); pci_write_config_byte(dev, 0x76, busarb);
printk(KERN_INFO "Applying VIA southbridge workaround.\n"); printk(KERN_INFO "Applying VIA southbridge workaround.\n");
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, quirk_vialatency );
/* /*
* VIA Apollo VP3 needs ETBF on BT848/878 * VIA Apollo VP3 needs ETBF on BT848/878
...@@ -158,6 +179,8 @@ static void __devinit quirk_viaetbf(struct pci_dev *dev) ...@@ -158,6 +179,8 @@ static void __devinit quirk_viaetbf(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_VIAETBF; pci_pci_problems|=PCIPCI_VIAETBF;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf );
static void __devinit quirk_vsfx(struct pci_dev *dev) static void __devinit quirk_vsfx(struct pci_dev *dev)
{ {
if((pci_pci_problems&PCIPCI_VSFX)==0) if((pci_pci_problems&PCIPCI_VSFX)==0)
...@@ -166,6 +189,7 @@ static void __devinit quirk_vsfx(struct pci_dev *dev) ...@@ -166,6 +189,7 @@ static void __devinit quirk_vsfx(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_VSFX; pci_pci_problems|=PCIPCI_VSFX;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, quirk_vsfx );
/* /*
* Ali Magik requires workarounds to be used by the drivers * Ali Magik requires workarounds to be used by the drivers
...@@ -182,6 +206,8 @@ static void __init quirk_alimagik(struct pci_dev *dev) ...@@ -182,6 +206,8 @@ static void __init quirk_alimagik(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_ALIMAGIK|PCIPCI_TRITON; pci_pci_problems|=PCIPCI_ALIMAGIK|PCIPCI_TRITON;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1647, quirk_alimagik );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1651, quirk_alimagik );
/* /*
...@@ -197,6 +223,12 @@ static void __devinit quirk_natoma(struct pci_dev *dev) ...@@ -197,6 +223,12 @@ static void __devinit quirk_natoma(struct pci_dev *dev)
pci_pci_problems|=PCIPCI_NATOMA; pci_pci_problems|=PCIPCI_NATOMA;
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_natoma );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443LX_0, quirk_natoma );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443LX_1, quirk_natoma );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0, quirk_natoma );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_1, quirk_natoma );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, quirk_natoma );
/* /*
* S3 868 and 968 chips report region size equal to 32M, but they decode 64M. * S3 868 and 968 chips report region size equal to 32M, but they decode 64M.
...@@ -212,6 +244,8 @@ static void __devinit quirk_s3_64M(struct pci_dev *dev) ...@@ -212,6 +244,8 @@ static void __devinit quirk_s3_64M(struct pci_dev *dev)
r->end = 0x3ffffff; r->end = 0x3ffffff;
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_868, quirk_s3_64M );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_968, quirk_s3_64M );
static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, unsigned size, int nr) static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, unsigned size, int nr)
{ {
...@@ -239,6 +273,7 @@ static void __devinit quirk_ati_exploding_mce(struct pci_dev *dev) ...@@ -239,6 +273,7 @@ static void __devinit quirk_ati_exploding_mce(struct pci_dev *dev)
request_region(0x3b0, 0x0C, "RadeonIGP"); request_region(0x3b0, 0x0C, "RadeonIGP");
request_region(0x3d3, 0x01, "RadeonIGP"); request_region(0x3d3, 0x01, "RadeonIGP");
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_exploding_mce );
/* /*
* Let's make the southbridge information explicit instead * Let's make the southbridge information explicit instead
...@@ -260,6 +295,7 @@ static void __devinit quirk_ali7101_acpi(struct pci_dev *dev) ...@@ -260,6 +295,7 @@ static void __devinit quirk_ali7101_acpi(struct pci_dev *dev)
pci_read_config_word(dev, 0xE2, &region); pci_read_config_word(dev, 0xE2, &region);
quirk_io_region(dev, region, 32, PCI_BRIDGE_RESOURCES+1); quirk_io_region(dev, region, 32, PCI_BRIDGE_RESOURCES+1);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, quirk_ali7101_acpi );
/* /*
* PIIX4 ACPI: Two IO regions pointed to by longwords at * PIIX4 ACPI: Two IO regions pointed to by longwords at
...@@ -275,6 +311,7 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev) ...@@ -275,6 +311,7 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev)
pci_read_config_dword(dev, 0x90, &region); pci_read_config_dword(dev, 0x90, &region);
quirk_io_region(dev, region, 32, PCI_BRIDGE_RESOURCES+1); quirk_io_region(dev, region, 32, PCI_BRIDGE_RESOURCES+1);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi );
/* /*
* ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
...@@ -291,6 +328,15 @@ static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev) ...@@ -291,6 +328,15 @@ static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev)
pci_read_config_dword(dev, 0x58, &region); pci_read_config_dword(dev, 0x58, &region);
quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1); quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, quirk_ich4_lpc_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi );
/* /*
* VIA ACPI: One IO region pointed to by longword at * VIA ACPI: One IO region pointed to by longword at
...@@ -308,6 +354,7 @@ static void __devinit quirk_vt82c586_acpi(struct pci_dev *dev) ...@@ -308,6 +354,7 @@ static void __devinit quirk_vt82c586_acpi(struct pci_dev *dev)
quirk_io_region(dev, region, 256, PCI_BRIDGE_RESOURCES); quirk_io_region(dev, region, 256, PCI_BRIDGE_RESOURCES);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt82c586_acpi );
/* /*
* VIA VT82C686 ACPI: Three IO region pointed to by (long)words at * VIA VT82C686 ACPI: Three IO region pointed to by (long)words at
...@@ -330,6 +377,7 @@ static void __devinit quirk_vt82c686_acpi(struct pci_dev *dev) ...@@ -330,6 +377,7 @@ static void __devinit quirk_vt82c686_acpi(struct pci_dev *dev)
smb &= PCI_BASE_ADDRESS_IO_MASK; smb &= PCI_BASE_ADDRESS_IO_MASK;
quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 2); quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 2);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi );
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
...@@ -358,6 +406,7 @@ static void __devinit quirk_via_ioapic(struct pci_dev *dev) ...@@ -358,6 +406,7 @@ static void __devinit quirk_via_ioapic(struct pci_dev *dev)
/* Offset 0x58: External APIC IRQ output control */ /* Offset 0x58: External APIC IRQ output control */
pci_write_config_byte (dev, 0x58, tmp); pci_write_config_byte (dev, 0x58, tmp);
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic );
/* /*
* The AMD io apic can hang the box when an apic irq is masked. * The AMD io apic can hang the box when an apic irq is masked.
...@@ -380,12 +429,14 @@ static void __devinit quirk_amd_ioapic(struct pci_dev *dev) ...@@ -380,12 +429,14 @@ static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
printk(KERN_WARNING " : booting with the \"noapic\" option.\n"); printk(KERN_WARNING " : booting with the \"noapic\" option.\n");
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic );
static void __init quirk_ioapic_rmw(struct pci_dev *dev) static void __init quirk_ioapic_rmw(struct pci_dev *dev)
{ {
if (dev->devfn == 0 && dev->bus->number == 0) if (dev->devfn == 0 && dev->bus->number == 0)
sis_apic_bug = 1; sis_apic_bug = 1;
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw );
#define AMD8131_revA0 0x01 #define AMD8131_revA0 0x01
#define AMD8131_revB0 0x11 #define AMD8131_revB0 0x11
...@@ -407,6 +458,7 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev) ...@@ -407,6 +458,7 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
pci_write_config_byte( dev, AMD8131_MISC, tmp); pci_write_config_byte( dev, AMD8131_MISC, tmp);
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC, quirk_amd_8131_ioapic );
#endif /* CONFIG_X86_IO_APIC */ #endif /* CONFIG_X86_IO_APIC */
...@@ -444,6 +496,8 @@ static void __devinit quirk_via_acpi(struct pci_dev *d) ...@@ -444,6 +496,8 @@ static void __devinit quirk_via_acpi(struct pci_dev *d)
if (irq && (irq != 2)) if (irq && (irq != 2))
d->irq = irq; d->irq = irq;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi );
static void __devinit quirk_via_irqpic(struct pci_dev *dev) static void __devinit quirk_via_irqpic(struct pci_dev *dev)
{ {
...@@ -459,6 +513,9 @@ static void __devinit quirk_via_irqpic(struct pci_dev *dev) ...@@ -459,6 +513,9 @@ static void __devinit quirk_via_irqpic(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic );
/* /*
...@@ -480,6 +537,8 @@ static void __devinit quirk_piix3_usb(struct pci_dev *dev) ...@@ -480,6 +537,8 @@ static void __devinit quirk_piix3_usb(struct pci_dev *dev)
legsup &= 0x50ef; legsup &= 0x50ef;
pci_write_config_word(dev, 0xc0, legsup); pci_write_config_word(dev, 0xc0, legsup);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb );
/* /*
* VIA VT82C598 has its device ID settable and many BIOSes * VIA VT82C598 has its device ID settable and many BIOSes
...@@ -492,6 +551,7 @@ static void __devinit quirk_vt82c598_id(struct pci_dev *dev) ...@@ -492,6 +551,7 @@ static void __devinit quirk_vt82c598_id(struct pci_dev *dev)
pci_write_config_byte(dev, 0xfc, 0); pci_write_config_byte(dev, 0xfc, 0);
pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device); pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id );
/* /*
* CardBus controllers have a legacy base address that enables them * CardBus controllers have a legacy base address that enables them
...@@ -505,6 +565,7 @@ static void __devinit quirk_cardbus_legacy(struct pci_dev *dev) ...@@ -505,6 +565,7 @@ static void __devinit quirk_cardbus_legacy(struct pci_dev *dev)
return; return;
pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0); pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
} }
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy );
/* /*
* Following the PCI ordering rules is optional on the AMD762. I'm not * Following the PCI ordering rules is optional on the AMD762. I'm not
...@@ -528,6 +589,7 @@ static void __devinit quirk_amd_ordering(struct pci_dev *dev) ...@@ -528,6 +589,7 @@ static void __devinit quirk_amd_ordering(struct pci_dev *dev)
pci_write_config_dword(dev, 0x84, pcic); pci_write_config_dword(dev, 0x84, pcic);
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
/* /*
* DreamWorks provided workaround for Dunord I-3000 problem * DreamWorks provided workaround for Dunord I-3000 problem
...@@ -543,11 +605,21 @@ static void __devinit quirk_dunord ( struct pci_dev * dev ) ...@@ -543,11 +605,21 @@ static void __devinit quirk_dunord ( struct pci_dev * dev )
r -> start = 0; r -> start = 0;
r -> end = 0xffffff; r -> end = 0xffffff;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DUNORD, PCI_DEVICE_ID_DUNORD_I3000, quirk_dunord );
/*
* i82380FB mobile docking controller: its PCI-to-PCI bridge
* is subtractive decoding (transparent), and does indicate this
* in the ProgIf. Unfortunately, the ProgIf value is wrong - 0x80
* instead of 0x01.
*/
static void __devinit quirk_transparent_bridge(struct pci_dev *dev) static void __devinit quirk_transparent_bridge(struct pci_dev *dev)
{ {
dev->transparent = 1; dev->transparent = 1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82380FB, quirk_transparent_bridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA, 0x605, quirk_transparent_bridge );
/* /*
* Common misconfiguration of the MediaGX/Geode PCI master that will * Common misconfiguration of the MediaGX/Geode PCI master that will
...@@ -566,6 +638,8 @@ static void __init quirk_mediagx_master(struct pci_dev *dev) ...@@ -566,6 +638,8 @@ static void __init quirk_mediagx_master(struct pci_dev *dev)
pci_write_config_byte(dev, 0x41, reg); pci_write_config_byte(dev, 0x41, reg);
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
/* /*
* As per PCI spec, ignore base address registers 0-3 of the IDE controllers * As per PCI spec, ignore base address registers 0-3 of the IDE controllers
...@@ -616,6 +690,7 @@ static void __devinit quirk_ide_bases(struct pci_dev *dev) ...@@ -616,6 +690,7 @@ static void __devinit quirk_ide_bases(struct pci_dev *dev)
printk(KERN_INFO "PCI: Ignoring BAR%d-%d of IDE controller %s\n", printk(KERN_INFO "PCI: Ignoring BAR%d-%d of IDE controller %s\n",
first_bar, last_bar, pci_name(dev)); first_bar, last_bar, pci_name(dev));
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_ide_bases );
/* /*
* Ensure C0 rev restreaming is off. This is normally done by * Ensure C0 rev restreaming is off. This is normally done by
...@@ -639,6 +714,7 @@ static void __init quirk_disable_pxb(struct pci_dev *pdev) ...@@ -639,6 +714,7 @@ static void __init quirk_disable_pxb(struct pci_dev *pdev)
printk(KERN_INFO "PCI: C0 revision 450NX. Disabling PCI restreaming.\n"); printk(KERN_INFO "PCI: C0 revision 450NX. Disabling PCI restreaming.\n");
} }
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb );
/* /*
* VIA northbridges care about PCI_INTERRUPT_LINE * VIA northbridges care about PCI_INTERRUPT_LINE
...@@ -651,6 +727,7 @@ static void __devinit quirk_via_bridge(struct pci_dev *pdev) ...@@ -651,6 +727,7 @@ static void __devinit quirk_via_bridge(struct pci_dev *pdev)
if(pdev->devfn == 0) if(pdev->devfn == 0)
interrupt_line_quirk = 1; interrupt_line_quirk = 1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_bridge );
/* /*
* Serverworks CSB5 IDE does not fully support native mode * Serverworks CSB5 IDE does not fully support native mode
...@@ -667,6 +744,7 @@ static void __init quirk_svwks_csb5ide(struct pci_dev *pdev) ...@@ -667,6 +744,7 @@ static void __init quirk_svwks_csb5ide(struct pci_dev *pdev)
quirk_ide_bases(pdev); quirk_ide_bases(pdev);
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide );
/* This was originally an Alpha specific thing, but it really fits here. /* This was originally an Alpha specific thing, but it really fits here.
* The i82375 PCI/EISA bridge appears as non-classified. Fix that. * The i82375 PCI/EISA bridge appears as non-classified. Fix that.
...@@ -676,6 +754,7 @@ static void __init quirk_eisa_bridge(struct pci_dev *dev) ...@@ -676,6 +754,7 @@ static void __init quirk_eisa_bridge(struct pci_dev *dev)
{ {
dev->class = PCI_CLASS_BRIDGE_EISA << 8; dev->class = PCI_CLASS_BRIDGE_EISA << 8;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge );
/* /*
* On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
...@@ -732,6 +811,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) ...@@ -732,6 +811,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845G_HB, asus_hides_smbus_hostbridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82850_HB, asus_hides_smbus_hostbridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_7205_0, asus_hides_smbus_hostbridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge );
static void __init asus_hides_smbus_lpc(struct pci_dev *dev) static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
{ {
...@@ -750,6 +835,9 @@ static void __init asus_hides_smbus_lpc(struct pci_dev *dev) ...@@ -750,6 +835,9 @@ static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
printk(KERN_INFO "PCI: Enabled i801 SMBus device\n"); printk(KERN_INFO "PCI: Enabled i801 SMBus device\n");
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc );
/* /*
* SiS 96x south bridge: BIOS typically hides SMBus device... * SiS 96x south bridge: BIOS typically hides SMBus device...
...@@ -803,6 +891,19 @@ static void __init quirk_sis_96x_compatible(struct pci_dev *dev) ...@@ -803,6 +891,19 @@ static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
{ {
sis_96x_compatible = 1; sis_96x_compatible = 1;
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_645, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_646, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_648, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_651, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus );
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus );
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
static void __init quirk_alder_ioapic(struct pci_dev *pdev) static void __init quirk_alder_ioapic(struct pci_dev *pdev)
...@@ -825,6 +926,7 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev) ...@@ -825,6 +926,7 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev)
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic );
#endif #endif
#ifdef CONFIG_SCSI_SATA #ifdef CONFIG_SCSI_SATA
...@@ -898,6 +1000,7 @@ static void __init quirk_intel_ide_combined(struct pci_dev *pdev) ...@@ -898,6 +1000,7 @@ static void __init quirk_intel_ide_combined(struct pci_dev *pdev)
else else
request_region(0x170, 8, "libata"); /* port 1 */ request_region(0x170, 8, "libata"); /* port 1 */
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined );
#endif /* CONFIG_SCSI_SATA */ #endif /* CONFIG_SCSI_SATA */
int pciehp_msi_quirk; int pciehp_msi_quirk;
...@@ -906,6 +1009,7 @@ static void __devinit quirk_pciehp_msi(struct pci_dev *pdev) ...@@ -906,6 +1009,7 @@ static void __devinit quirk_pciehp_msi(struct pci_dev *pdev)
{ {
pciehp_msi_quirk = 1; pciehp_msi_quirk = 1;
} }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_pciehp_msi );
/* /*
* The main table of quirks. * The main table of quirks.
...@@ -914,141 +1018,11 @@ static void __devinit quirk_pciehp_msi(struct pci_dev *pdev) ...@@ -914,141 +1018,11 @@ static void __devinit quirk_pciehp_msi(struct pci_dev *pdev)
* be declared __init. * be declared __init.
*/ */
static struct pci_fixup pci_fixups[] __devinitdata = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_DUNORD, PCI_DEVICE_ID_DUNORD_I3000, quirk_dunord },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_passive_release },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_passive_release },
/*
* Its not totally clear which chipsets are the problematic ones
* We know 82C586 and 82C596 variants are affected.
*/
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_868, quirk_s3_64M },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_968, quirk_s3_64M },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, quirk_triton },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437VX, quirk_triton },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82439, quirk_triton },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82439TX, quirk_triton },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443LX_0, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443LX_1, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_1, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_645, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_646, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_648, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_651, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1647, quirk_alimagik },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1651, quirk_alimagik },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, quirk_vsfx },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt82c586_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi },
/* Intel LPC interface bridges all have 128 bytes of magic ACPI/TCO regs and 64 bytes of GPIO */
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, quirk_ali7101_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb },
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, quirk_ide_bases },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_bridge },
{ PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy },
#ifdef CONFIG_X86_IO_APIC
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC,
quirk_amd_8131_ioapic },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic },
#endif
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_exploding_mce },
/*
* i82380FB mobile docking controller: its PCI-to-PCI bridge
* is subtractive decoding (transparent), and does indicate this
* in the ProgIf. Unfortunately, the ProgIf value is wrong - 0x80
* instead of 0x01.
*/
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82380FB, quirk_transparent_bridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_TOSHIBA, 0x605, quirk_transparent_bridge },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master }, static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge },
/*
* on Asus P4B boards, the i801SMBus device is disabled at startup.
* this also goes for boards in HP Compaq nc6000 and nc8000 notebooks.
*/
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845G_HB, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82850_HB, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_7205_0, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc },
#ifdef CONFIG_SCSI_SATA
/* Fixup BIOSes that configure Parallel ATA (PATA / IDE) and
* Serial ATA (SATA) into the same PCI ID.
*/
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
quirk_intel_ide_combined },
#endif /* CONFIG_SCSI_SATA */
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_pciehp_msi },
{ 0 }
};
static void pci_do_fixups(struct pci_dev *dev, int pass, struct pci_fixup *f)
{ {
while (f->pass) { while (f < end) {
if (f->pass == pass && if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
(f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
(f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
#ifdef DEBUG #ifdef DEBUG
printk(KERN_INFO "PCI: Calling quirk %p for %s\n", f->hook, pci_name(dev)); printk(KERN_INFO "PCI: Calling quirk %p for %s\n", f->hook, pci_name(dev));
...@@ -1059,10 +1033,27 @@ static void pci_do_fixups(struct pci_dev *dev, int pass, struct pci_fixup *f) ...@@ -1059,10 +1033,27 @@ static void pci_do_fixups(struct pci_dev *dev, int pass, struct pci_fixup *f)
} }
} }
extern struct pci_fixup __start_pci_fixups_header[];
extern struct pci_fixup __end_pci_fixups_header[];
extern struct pci_fixup __start_pci_fixups_final[];
extern struct pci_fixup __end_pci_fixups_final[];
void pci_fixup_device(int pass, struct pci_dev *dev) void pci_fixup_device(int pass, struct pci_dev *dev)
{ {
pci_do_fixups(dev, pass, pcibios_fixups); struct pci_fixup *start, *end;
pci_do_fixups(dev, pass, pci_fixups);
switch(pass) {
case PCI_FIXUP_HEADER:
start = __start_pci_fixups_header;
end = __end_pci_fixups_header;
break;
case PCI_FIXUP_FINAL:
start = __start_pci_fixups_final;
end = __end_pci_fixups_final;
break;
}
pci_do_fixups(dev, start, end);
} }
EXPORT_SYMBOL(pciehp_msi_quirk); EXPORT_SYMBOL(pciehp_msi_quirk);
...@@ -16,6 +16,16 @@ ...@@ -16,6 +16,16 @@
*(.rodata1) \ *(.rodata1) \
} \ } \
\ \
/* PCI quirks */ \
.pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
*(.pci_fixup_header) \
VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
*(.pci_fixup_final) \
VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
} \
\
/* Kernel symbol table: Normal symbols */ \ /* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ksymtab) = .; \ VMLINUX_SYMBOL(__start___ksymtab) = .; \
......
...@@ -1001,16 +1001,25 @@ static inline char *pci_name(struct pci_dev *pdev) ...@@ -1001,16 +1001,25 @@ static inline char *pci_name(struct pci_dev *pdev)
*/ */
struct pci_fixup { struct pci_fixup {
int pass;
u16 vendor, device; /* You can use PCI_ANY_ID here of course */ u16 vendor, device; /* You can use PCI_ANY_ID here of course */
void (*hook)(struct pci_dev *dev); void (*hook)(struct pci_dev *dev);
}; };
extern struct pci_fixup pcibios_fixups[];
#define PCI_FIXUP_HEADER 1 /* Called immediately after reading configuration header */ #define PCI_FIXUP_HEADER 1 /* Called immediately after reading configuration header */
#define PCI_FIXUP_FINAL 2 /* Final phase of device fixups */ #define PCI_FIXUP_FINAL 2 /* Final phase of device fixups */
/* Anonymous variables would be nice... */
#define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \
static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__ \
__attribute__((__section__(".pci_fixup_header"))) = { \
vendor, device, hook };
#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \
static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__ \
__attribute__((__section__(".pci_fixup_final"))) = { \
vendor, device, hook };
void pci_fixup_device(int pass, struct pci_dev *dev); void pci_fixup_device(int pass, struct pci_dev *dev);
extern int pci_pci_problems; extern int pci_pci_problems;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment