[PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.

Subsystems: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded ppc85xx, the rest

STALE6956d

8 messages, 4 authors, 2007-07-24 · open the first message on its own page

[PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.

From: Randy Vinson <hidden>
Date: 2007-07-20 18:56:57

From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001
From: Randy Vinson <redacted>
Date: Thu, 19 Jul 2007 10:40:53 -0700
Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections.

Setting the host bridge @8000 as primary and only calling setup_pci_atmu
for the PCI Express host bridge. Also fixing a bug in setting the USB
interrupt numbers.

Signed-off-by: Randy Vinson <redacted>
---
 arch/powerpc/platforms/85xx/mpc85xx_cds.c |    8 ++++----
 arch/powerpc/sysdev/fsl_pci.c             |    3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 963c6f8..862f394 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -114,7 +114,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
 		/* There are two USB controllers.
 		 * Identify them by functon number
 		 */
-			if (PCI_FUNC(dev->devfn))
+			if (PCI_FUNC(dev->devfn) == 3)
 				dev->irq = 11;
 			else
 				dev->irq = 10;
@@ -272,10 +272,10 @@ static void __init mpc85xx_cds_setup_arch(void)
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
 		struct resource rsrc;
 		of_address_to_resource(np, 0, &rsrc);
-		if ((rsrc.start & 0xfffff) == 0x9000)
-			fsl_add_bridge(np, 0);
-		else
+		if ((rsrc.start & 0xfffff) == 0x8000)
 			fsl_add_bridge(np, 1);
+		else
+			fsl_add_bridge(np, 0);
 	}
 	ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
 #endif
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 2eefcde..931e212 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -195,7 +195,8 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
 	pci_process_bridge_OF_ranges(hose, dev, is_primary);
 
 	/* Setup PEX window registers */
-	setup_pci_atmu(hose, &rsrc);
+	if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP))
+		setup_pci_atmu(hose, &rsrc);
 
 	return 0;
 }
-- 
1.5.2.2.549.gaeb59

Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.

From: Kumar Gala <hidden>
Date: 2007-07-20 21:11:57

On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote:
quoted
From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00  
2001
From: Randy Vinson <redacted>
Date: Thu, 19 Jul 2007 10:40:53 -0700
Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections.

Setting the host bridge @8000 as primary and only calling  
setup_pci_atmu
for the PCI Express host bridge. Also fixing a bug in setting the USB
interrupt numbers.
What issue exists with calling setup_pci_atmu on normal PCI?

- k

Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.

From: Randy Vinson <hidden>
Date: 2007-07-20 22:14:42

Kumar Gala wrote:
On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote:
quoted
quoted
From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001
From: Randy Vinson <redacted>
Date: Thu, 19 Jul 2007 10:40:53 -0700
Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections.

Setting the host bridge @8000 as primary and only calling setup_pci_atmu
for the PCI Express host bridge. Also fixing a bug in setting the USB
interrupt numbers.
What issue exists with calling setup_pci_atmu on normal PCI?
At one point, it caused problems with the primary PCI controller, but I
just tried it without the exclusion and it was OK. I'm wondering if my
original problem was due to a buggy DTS file.

I'll remove that part of the patch and resubmit.

Randy Vinson

Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.

From: Randy Vinson <hidden>
Date: 2007-07-20 22:31:31

From 57501bb79c2d5212c02766a32685d415cc74a4ab Mon Sep 17 00:00:00 2001
From: Randy Vinson <redacted>
Date: Thu, 19 Jul 2007 10:40:53 -0700
Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections.

Setting the host bridge @8000 as primary. Also fixing a bug in
setting the USB interrupt numbers.

Signed-off-by: Randy Vinson <redacted>
---
 arch/powerpc/platforms/85xx/mpc85xx_cds.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 963c6f8..862f394 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -114,7 +114,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
 		/* There are two USB controllers.
 		 * Identify them by functon number
 		 */
-			if (PCI_FUNC(dev->devfn))
+			if (PCI_FUNC(dev->devfn) == 3)
 				dev->irq = 11;
 			else
 				dev->irq = 10;
@@ -272,10 +272,10 @@ static void __init mpc85xx_cds_setup_arch(void)
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
 		struct resource rsrc;
 		of_address_to_resource(np, 0, &rsrc);
-		if ((rsrc.start & 0xfffff) == 0x9000)
-			fsl_add_bridge(np, 0);
-		else
+		if ((rsrc.start & 0xfffff) == 0x8000)
 			fsl_add_bridge(np, 1);
+		else
+			fsl_add_bridge(np, 0);
 	}
 	ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
 #endif
-- 
1.5.2.2.549.gaeb59

Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.

From: Zang Roy-r61911 <hidden>
Date: 2007-07-23 10:04:45

On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:
quoted hunk
@@ -272,10 +272,10 @@ static void __init mpc85xx_cds_setup_arch(void)
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) !=
NULL;) {
                struct resource rsrc;
                of_address_to_resource(np, 0, &rsrc);
-               if ((rsrc.start & 0xfffff) == 0x9000)
-                       fsl_add_bridge(np, 0);
-               else
+               if ((rsrc.start & 0xfffff) == 0x8000)
                        fsl_add_bridge(np, 1);
+               else
+                       fsl_add_bridge(np, 0);
Why this is needed?
For pcie@a000, fsl_add_bridge(np, 0)?
Roy

Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.

From: Randy Vinson <hidden>
Date: 2007-07-23 18:04:21

Zang Roy-r61911 wrote:
On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:
quoted
@@ -272,10 +272,10 @@ static void __init mpc85xx_cds_setup_arch(void)
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) !=
NULL;) {
                struct resource rsrc;
                of_address_to_resource(np, 0, &rsrc);
-               if ((rsrc.start & 0xfffff) == 0x9000)
-                       fsl_add_bridge(np, 0);
-               else
+               if ((rsrc.start & 0xfffff) == 0x8000)
                        fsl_add_bridge(np, 1);
+               else
+                       fsl_add_bridge(np, 0);
Why this is needed?
For pcie@a000, fsl_add_bridge(np, 0)?
The old version of the code would call fsl_add_bridge(np, 1) for the
host bridges @8000 and @a000. When I tried it that way, it didn't work.
I don't think you can have 2 primary bridges.

Randy V.

RE: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.

From: Zang Roy-r61911 <hidden>
Date: 2007-07-24 05:35:41

=20
-----Original Message-----
From: Randy Vinson [mailto:rvinson@mvista.com]=20
Zang Roy-r61911 wrote:
quoted
On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:
=20
quoted
@@ -272,10 +272,10 @@ static void __init=20
mpc85xx_cds_setup_arch(void)
quoted
quoted
        for (np =3D NULL; (np =3D of_find_node_by_type(np, "pci")) =
!=3D
quoted
quoted
NULL;) {
                struct resource rsrc;
                of_address_to_resource(np, 0, &rsrc);
-               if ((rsrc.start & 0xfffff) =3D=3D 0x9000)
-                       fsl_add_bridge(np, 0);
-               else
+               if ((rsrc.start & 0xfffff) =3D=3D 0x8000)
                        fsl_add_bridge(np, 1);
+               else
+                       fsl_add_bridge(np, 0);
Why this is needed?
For pcie@a000, fsl_add_bridge(np, 0)?
The old version of the code would call fsl_add_bridge(np, 1) for the
host bridges @8000 and @a000. When I tried it that way, it=20
didn't work
What did not work? I tried two Ethernet cards @8000 and @a000. they
worked..
I don't think you can have 2 primary bridges.
Why?
They belong to two separate pci domain.
Roy

Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.

From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-07-24 08:04:46

On Tuesday 24 July 2007, Zang Roy-r61911 wrote:
quoted
From: Randy Vinson [mailto:rvinson@mvista.com] 
I don't think you can have 2 primary bridges.
Why?
They belong to two separate pci domain.
PCI host bridge == PCI domain

A PHB canhave multiple buses, but only one PHB can be
the primary one, which is defined as being the one
that can hold ISA device. The problem is that ISA does
not support multiple domains, so all devices with
well-known ISA I/O port addresses have to be on the
same PHB.

	Arnd <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help