linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl@pobox.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 1/4] maple: match "pcie" name for CPC945
Date: Mon, 11 Dec 2006 16:38:12 -0600	[thread overview]
Message-ID: <20061211223812.GD6573@localdomain> (raw)
In-Reply-To: <38E12654-EED6-4335-9DC6-293FE70A797C@kernel.crashing.org>

Segher Boessenkool wrote:
> >Some firmwares have "pcie" for the "name" property of the CPC945 PCI
> >Express host bridge.  Check for "pcie" in addition to "pci" so we
> >don't miss it.
> 
> You shouldn't use "name" but "device_type" and "compatible".

Like this?

(Hmm, does the u3-agp on maple have "pci" for device_type?)

diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 3a32ded..011f0f1 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -560,13 +560,16 @@ void __init maple_pci_init(void)
 		return;
 	}
 	for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
-		if (np->name == NULL)
+		if (!np->type)
 			continue;
-		if (strcmp(np->name, "pci") == 0) {
-			if (add_bridge(np) == 0)
-				of_node_get(np);
-		}
-		if (strcmp(np->name, "ht") == 0) {
+		if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
+			continue;
+		if ((device_is_compatible(np, "u4-pcie") ||
+		     device_is_compatible(np, "u3-agp")) &&
+		    add_bridge(np) == 0)
+			of_node_get(np);
+
+		if (device_is_compatible(np, "u3-ht")) {
 			of_node_get(np);
 			ht = np;
 		}

  reply	other threads:[~2006-12-11 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  0:50 [PATCH 1/4] maple: match "pcie" name for CPC945 Nathan Lynch
2006-12-07  0:50 ` [PATCH 2/4] maple: select PPC_RTAS Nathan Lynch
2006-12-07  0:50   ` [PATCH 3/4] add rtas_service_present() helper Nathan Lynch
2006-12-07  0:50     ` [PATCH 4/4] maple: use RTAS for reboot and halt Nathan Lynch
2006-12-07  2:51     ` [PATCH 3/4] add rtas_service_present() helper Michael Ellerman
2006-12-07  3:25       ` Nathan Lynch
2006-12-07 21:05       ` Linas Vepstas
2006-12-07  3:20 ` [PATCH 1/4] maple: match "pcie" name for CPC945 Olof Johansson
2006-12-07  8:41   ` Segher Boessenkool
2006-12-07  8:30 ` Segher Boessenkool
2006-12-11 22:38   ` Nathan Lynch [this message]
2006-12-12 22:26     ` Benjamin Herrenschmidt

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=20061211223812.GD6573@localdomain \
    --to=ntl@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=segher@kernel.crashing.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).