linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Feng Kan <fkan@amcc.com>
To: linuxppc-dev@ozlabs.org
Cc: Feng Kan <fkan@appliedmicro.com>,
	Tirumala R Marri <tmarri@appliedmicro.com>
Subject: [PATCH] fix the problem where pcix node is probed again as pci node.
Date: Tue, 30 Mar 2010 10:41:18 -0700	[thread overview]
Message-ID: <1269970878-5080-1-git-send-email-fkan@amcc.com> (raw)

From: Feng Kan <fkan@appliedmicro.com>

The current matching scheme make the pci node match to pcix or pciex node.
To avoid the match, change the method so only one type of initialization
is called per node.

Signed-off-by: Feng Kan <fkan@appliedmicro.com>
Signed-off-by: Tirumala R Marri <tmarri@appliedmicro.com>
---
 arch/powerpc/sysdev/ppc4xx_pci.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index 8aa3302..1e67c74 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1842,14 +1842,16 @@ static int __init ppc4xx_pci_find_bridges(void)
 
 	ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0;
 
+	for_each_compatible_node(np, NULL, "ibm,plb-pci") {
+		if (of_device_is_compatible(np, "ibm,plb-pcix"))
+			ppc4xx_probe_pcix_bridge(np);
 #ifdef CONFIG_PPC4xx_PCI_EXPRESS
-	for_each_compatible_node(np, NULL, "ibm,plb-pciex")
-		ppc4xx_probe_pciex_bridge(np);
+		else if (of_device_is_compatible(np, "ibm,plb-pciex"))
+			ppc4xx_probe_pciex_bridge(np);
 #endif
-	for_each_compatible_node(np, NULL, "ibm,plb-pcix")
-		ppc4xx_probe_pcix_bridge(np);
-	for_each_compatible_node(np, NULL, "ibm,plb-pci")
-		ppc4xx_probe_pci_bridge(np);
+		else
+			ppc4xx_probe_pci_bridge(np);
+	}
 
 	return 0;
 }
-- 
1.5.5

             reply	other threads:[~2010-03-30 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 17:41 Feng Kan [this message]
2010-03-30 20:48 ` [PATCH] fix the problem where pcix node is probed again as pci node Benjamin Herrenschmidt
2010-03-30 21:14   ` Benjamin Herrenschmidt
2010-03-30 22:02     ` Feng Kan
2010-03-30 22:28       ` Benjamin Herrenschmidt
2010-03-30 22:28     ` Grant Likely

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=1269970878-5080-1-git-send-email-fkan@amcc.com \
    --to=fkan@amcc.com \
    --cc=fkan@appliedmicro.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=tmarri@appliedmicro.com \
    /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).