linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
@ 2007-07-20 18:56 Randy Vinson
  2007-07-20 21:11 ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Vinson @ 2007-07-20 18:56 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org, Kumar Gala

>From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001
From: Randy Vinson <rvinson@mvista.com>
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 <rvinson@mvista.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-20 18:56 [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections Randy Vinson
@ 2007-07-20 21:11 ` Kumar Gala
  2007-07-20 22:14   ` Randy Vinson
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2007-07-20 21:11 UTC (permalink / raw)
  To: Randy Vinson; +Cc: linuxppc-dev@ozlabs.org


On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote:

>> From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00  
>> 2001
> From: Randy Vinson <rvinson@mvista.com>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-20 21:11 ` Kumar Gala
@ 2007-07-20 22:14   ` Randy Vinson
  2007-07-20 22:31     ` [PATCH 5/6 v2] " Randy Vinson
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Vinson @ 2007-07-20 22:14 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org

Kumar Gala wrote:
> 
> On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote:
> 
>>> From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001
>> From: Randy Vinson <rvinson@mvista.com>
>> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-20 22:14   ` Randy Vinson
@ 2007-07-20 22:31     ` Randy Vinson
  2007-07-23 10:04       ` Zang Roy-r61911
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Vinson @ 2007-07-20 22:31 UTC (permalink / raw)
  To: Kumar Gala, linuxppc-dev@ozlabs.org

>From 57501bb79c2d5212c02766a32685d415cc74a4ab Mon Sep 17 00:00:00 2001
From: Randy Vinson <rvinson@mvista.com>
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 <rvinson@mvista.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-20 22:31     ` [PATCH 5/6 v2] " Randy Vinson
@ 2007-07-23 10:04       ` Zang Roy-r61911
  2007-07-23 18:04         ` Randy Vinson
  0 siblings, 1 reply; 8+ messages in thread
From: Zang Roy-r61911 @ 2007-07-23 10:04 UTC (permalink / raw)
  To: Randy Vinson; +Cc: linuxppc-dev list

On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:

> @@ -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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-23 10:04       ` Zang Roy-r61911
@ 2007-07-23 18:04         ` Randy Vinson
  2007-07-24  5:35           ` Zang Roy-r61911
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Vinson @ 2007-07-23 18:04 UTC (permalink / raw)
  To: Zang Roy-r61911; +Cc: linuxppc-dev list

Zang Roy-r61911 wrote:
> On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:
> 
>> @@ -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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-23 18:04         ` Randy Vinson
@ 2007-07-24  5:35           ` Zang Roy-r61911
  2007-07-24  7:07             ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Zang Roy-r61911 @ 2007-07-24  5:35 UTC (permalink / raw)
  To: Randy Vinson; +Cc: linuxppc-dev list

=20

> -----Original Message-----
> From: Randy Vinson [mailto:rvinson@mvista.com]=20
> Zang Roy-r61911 wrote:
> > On Sat, 2007-07-21 at 06:31, Randy Vinson wrote:
> >=20
> >> @@ -272,10 +272,10 @@ static void __init=20
> mpc85xx_cds_setup_arch(void)
> >>         for (np =3D NULL; (np =3D of_find_node_by_type(np, "pci")) =
!=3D
> >> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/6 v2] 85xxCDS: Misc 8548 PCI Corrections.
  2007-07-24  5:35           ` Zang Roy-r61911
@ 2007-07-24  7:07             ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2007-07-24  7:07 UTC (permalink / raw)
  To: linuxppc-dev

On Tuesday 24 July 2007, Zang Roy-r61911 wrote:
> > 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 <><

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-07-24  8:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-20 18:56 [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections Randy Vinson
2007-07-20 21:11 ` Kumar Gala
2007-07-20 22:14   ` Randy Vinson
2007-07-20 22:31     ` [PATCH 5/6 v2] " Randy Vinson
2007-07-23 10:04       ` Zang Roy-r61911
2007-07-23 18:04         ` Randy Vinson
2007-07-24  5:35           ` Zang Roy-r61911
2007-07-24  7:07             ` Arnd Bergmann

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).