linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 12/14] powerpc/pci: Move FSL fixup from 32-bit to common
Date: Fri, 20 May 2011 01:09:29 -0500	[thread overview]
Message-ID: <1305871771-16334-12-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1305871771-16334-11-git-send-email-galak@kernel.crashing.org>

We need the FSL specific header fixup code on both 32-bit and 64-bit
platforms so just move the code into pci-common.c.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/kernel/pci-common.c |   18 ++++++++++++++++++
 arch/powerpc/kernel/pci_32.c     |   19 -------------------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 893af2a..4f134132c 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1728,3 +1728,21 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
 	if (mode == PCI_PROBE_NORMAL)
 		hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
 }
+
+static void fixup_hide_host_resource_fsl(struct pci_dev *dev)
+{
+	int i, class = dev->class >> 8;
+
+	if ((class == PCI_CLASS_PROCESSOR_POWERPC ||
+	     class == PCI_CLASS_BRIDGE_OTHER) &&
+		(dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
+		(dev->bus->parent == NULL)) {
+		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+			dev->resource[i].start = 0;
+			dev->resource[i].end = 0;
+			dev->resource[i].flags = 0;
+		}
+	}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index bedb370..d521644 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -51,25 +51,6 @@ struct pci_dev *isa_bridge_pcidev;
 EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
 
 static void
-fixup_hide_host_resource_fsl(struct pci_dev *dev)
-{
-	int i, class = dev->class >> 8;
-
-	if ((class == PCI_CLASS_PROCESSOR_POWERPC ||
-	     class == PCI_CLASS_BRIDGE_OTHER) &&
-		(dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
-		(dev->bus->parent == NULL)) {
-		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-			dev->resource[i].start = 0;
-			dev->resource[i].end = 0;
-			dev->resource[i].flags = 0;
-		}
-	}
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); 
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); 
-
-static void
 fixup_cpc710_pci64(struct pci_dev* dev)
 {
 	/* Hide the PCI64 BARs from the kernel as their content doesn't
-- 
1.7.3.4

  reply	other threads:[~2011-05-20  6:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20  6:09 [PATCH 01/14] powerpc: Rename e55xx_smp_defconfig to corenet64_smp_defconfig Kumar Gala
2011-05-20  6:09 ` [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms Kumar Gala
2011-05-20  6:09   ` [PATCH 03/14] powerpc/85xx: Add P5020DS device tree Kumar Gala
2011-05-20  6:09     ` [PATCH 04/14] powerpc/85xx: Add P3041DS " Kumar Gala
2011-05-20  6:09       ` [PATCH 05/14] powerpc/85xx: Updates to P4080DS " Kumar Gala
2011-05-20  6:09         ` [PATCH 06/14] powerpc/85xx: Cleanup PCIe support on corenet_ds boards Kumar Gala
2011-05-20  6:09           ` [PATCH 07/14] powerpc/fsl_pci: Simplify matching logic for PCI_FIXUP_HEADER Kumar Gala
2011-05-20  6:09             ` [PATCH 08/14] powerpc/85xx: Set up doorbells even with no mpic Kumar Gala
2011-05-20  6:09               ` [PATCH 09/14] powerpc/85xx: Save scratch registers to thread info instead of using SPRGs Kumar Gala
2011-05-20  6:09                 ` [PATCH 10/14] powerpc/85xx: Add basic P1023RDS board support Kumar Gala
2011-05-20  6:09                   ` [PATCH 11/14] powerpc/book3e: Clarify HW table walk enable/disable message Kumar Gala
2011-05-20  6:09                     ` Kumar Gala [this message]
2011-05-20  6:09                       ` [PATCH 13/14] powerpc/85xx: Add PCI support in 64-bit mode on P5020DS Kumar Gala
2011-05-20  6:09                         ` [PATCH 14/14] powerpc/qe: Limit QE support to ppc32 Kumar Gala
2011-05-20 19:04         ` [PATCH 05/14] powerpc/85xx: Updates to P4080DS device tree Scott Wood
2011-05-20 19:09           ` Kumar Gala
2011-05-20 14:45   ` [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms Tabi Timur-B04825
2011-05-20 19:20     ` Kumar Gala
2011-05-20 19:25       ` Timur Tabi
2011-05-20 19:30         ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305871771-16334-12-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).