[PATCH][5/3][ARM] PCI quirks update for ARM

From: Deepak Saxena (dsaxena_at_plexity.net)
Date: 08/03/04

  • Next message: Marko Macek: "Re: KVM & mouse wheel"
    Date:	Tue, 3 Aug 2004 12:37:16 -0700
    To: David Woodhouse <dwmw2@infradead.org>
    
    

    On Aug 03 2004, at 18:33, David Woodhouse was caught saying:
    > It's a pain in the arse to set up platform-specific PCI quirks -- you
    > have to put your platform-specific quirk into the generic (or at least
    > the architecture) array. This patch fixes that, allowing you to
    > DECLARE_PCI_FIXUP_HEADER() or DECLARE_PCI_FIXUP_FINAL() anywhere you
    > like.

    Good idea. Following is ARM patch.

    ===== arch/arm/kernel/bios32.c 1.34 vs edited =====
    --- 1.34/arch/arm/kernel/bios32.c Fri Jul 16 11:35:05 2004
    +++ edited/arch/arm/kernel/bios32.c Tue Aug 3 12:22:37 2004
    @@ -129,12 +129,14 @@
             pci_write_config_word(dev, 0x44, 0xb000);
             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)
     {
             dev->resource[0].end -= dev->resource[0].start;
             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
    @@ -155,6 +157,7 @@
                     }
             }
     }
    +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
    @@ -179,6 +182,7 @@
                     }
             }
     }
    +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.
    @@ -199,6 +203,7 @@
                     }
             }
     }
    +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
     
     /*
      * Put the DEC21142 to sleep
    @@ -207,6 +212,7 @@
     {
             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
    @@ -272,38 +278,7 @@
                     pci_write_config_byte(dev, 0x45, 0x03);
             }
     }
    -
    -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 }
    -};
    +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
     
     void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
     {

    Signed-off-by: Deepak Saxena <dsaxena@plexity.net>

    -- 
    Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
    "Unlike me, many of you have accepted the situation of your imprisonment and
     will die here like rotten cabbages." - Number 6
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Marko Macek: "Re: KVM & mouse wheel"

    Relevant Pages

    • Re: [PATCH][5/3][ARM] PCI quirks update for ARM
      ... >> the architecture) array. ... This patch fixes that, allowing you to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch] ia64 kprobes build fix
      ... The following patch fixes an ia64 build failure when kprobes is enabled ... as a result of the single-step out of line patch that expects each architecture ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.0-rc1-mm1
      ... Always copy and save the vlan header in bridge-nf ... This patch fixes it. ... /* Bridge Hooks */ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: nfs4 client bug
      ... A proprietary module was ... > ive been running this since i got the url and so far i havent hit it ... so i think its safe to say this patch fixes the issues i was seeing ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 1/2]: PowerPC/PCI Hotplug build break
      ... Reported today by Dave Jones: ... This patch fixes the break in the arch/powerpc tree. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)