All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Pci multi bridge bug
@ 2004-02-05  9:03 Philippe Simal
  2004-02-05  9:27 ` Wolfgang Denk
  2004-02-05 13:34 ` Travis Sawyer
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Simal @ 2004-02-05  9:03 UTC (permalink / raw)
  To: u-boot

Hello,

I'm running u-boot-1.0.0 on a IBM PPC440GP.
I have a custom made board with 2 pci-to-pci bridge Intel 21154BE and
several devices behind it. (* PCI bus layout)
On boot-up, u-boot immediately recognizes the 2 bridges and 1 device on bus
0.
It also has no problem for enumirating all the devices on bus 1, but u-boot
can't find any device on bus 2.
When I look at the bridge configuration using the 'pci 0 long' command, I
see that the secondary bus address field of bridge 1 is set to 1.
This should be 2. I also see that on bridge 1 but also on bridge 0 the
subordinate bus address field always is filled with a 0.

First of all I already implemented the type1 configuration cycle bug fix at
(..\drivers\Pci_indirect.c).

To work this kind of PCI configuration, I changed the following lines:
1. The problem with the secondary bus address is fixed by changing
     pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS, sub_bus + 1);
    to
    pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS,
hose->current_busno);
    in
   (file: '..\drivers\Pci_auto.c';   function: 'static void
pciauto_prescan_setup_bridge())
2. The problem with the subordinate bus address is solved by swapping the
code lines from
     pciauto_postscan_setup_bridge(hose, dev, sub_bus);
     sub_bus = hose->current_busno;
     to
     sub_bus = hose->current_busno;
     pciauto_postscan_setup_bridge(hose, dev, sub_bus);
    (file: '..\drivers\Pci_auto.c';   function: int pciauto_config_device())

I'm not sure if this fix is fully failed proof but it works fine for this
design.

I hope my findings can be a contribution to the u-boot project.

* PCI bus layout.

   BUS0
         |
         |
         |     /-------\  BUS1
         |---|            |--------       -> 7 PCI devices
         |     \-------/
         |   Bridge 0
         |
         |
         |     /-------\  BUS2
         |---|            |--------     -> 7 PCI devices
         |     \-------/
         |   Bridge 1
         |
         |
         |--- 1 PCI device

Greetings,
Philippe

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

* [U-Boot-Users] Pci multi bridge bug
  2004-02-05  9:03 [U-Boot-Users] Pci multi bridge bug Philippe Simal
@ 2004-02-05  9:27 ` Wolfgang Denk
  2004-02-05 13:34 ` Travis Sawyer
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2004-02-05  9:27 UTC (permalink / raw)
  To: u-boot

In message <001e01c3ebc6$e8e9e340$10c8c8c8@pc005> you wrote:
> 
> First of all I already implemented the type1 configuration cycle bug fix at
> (..\drivers\Pci_indirect.c).
...
> I hope my findings can be a contribution to the u-boot project.

Can you please submit a proper patch?

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Overflow on /dev/null, please empty the bit bucket.

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

* [U-Boot-Users] Pci multi bridge bug
  2004-02-05  9:03 [U-Boot-Users] Pci multi bridge bug Philippe Simal
  2004-02-05  9:27 ` Wolfgang Denk
@ 2004-02-05 13:34 ` Travis Sawyer
  1 sibling, 0 replies; 3+ messages in thread
From: Travis Sawyer @ 2004-02-05 13:34 UTC (permalink / raw)
  To: u-boot

Philippe:

I sent in a patch for this a couple of weeks ago (2 weeks?).

Search the archives for:
sibling p2p bridge

I'm sure its in Wolfgang's Q for cvs...

-travis

On Thu, 2004-02-05 at 04:03, Philippe Simal wrote:
> Hello,
> 
> I'm running u-boot-1.0.0 on a IBM PPC440GP.
> I have a custom made board with 2 pci-to-pci bridge Intel 21154BE and
> several devices behind it. (* PCI bus layout)
> On boot-up, u-boot immediately recognizes the 2 bridges and 1 device on bus
> 0.
> It also has no problem for enumirating all the devices on bus 1, but u-boot
> can't find any device on bus 2.
> When I look at the bridge configuration using the 'pci 0 long' command, I
> see that the secondary bus address field of bridge 1 is set to 1.
> This should be 2. I also see that on bridge 1 but also on bridge 0 the
> subordinate bus address field always is filled with a 0.
> 
> First of all I already implemented the type1 configuration cycle bug fix at
> (..\drivers\Pci_indirect.c).
> 
> To work this kind of PCI configuration, I changed the following lines:
> 1. The problem with the secondary bus address is fixed by changing
>      pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS, sub_bus + 1);
>     to
>     pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS,
> hose->current_busno);
>     in
>    (file: '..\drivers\Pci_auto.c';   function: 'static void
> pciauto_prescan_setup_bridge())
> 2. The problem with the subordinate bus address is solved by swapping the
> code lines from
>      pciauto_postscan_setup_bridge(hose, dev, sub_bus);
>      sub_bus = hose->current_busno;
>      to
>      sub_bus = hose->current_busno;
>      pciauto_postscan_setup_bridge(hose, dev, sub_bus);
>     (file: '..\drivers\Pci_auto.c';   function: int pciauto_config_device())
> 
> I'm not sure if this fix is fully failed proof but it works fine for this
> design.
> 
> I hope my findings can be a contribution to the u-boot project.
> 
> * PCI bus layout.
> 
>    BUS0
>          |
>          |
>          |     /-------\  BUS1
>          |---|            |--------       -> 7 PCI devices
>          |     \-------/
>          |   Bridge 0
>          |
>          |
>          |     /-------\  BUS2
>          |---|            |--------     -> 7 PCI devices
>          |     \-------/
>          |   Bridge 1
>          |
>          |
>          |--- 1 PCI device
> 
> Greetings,
> Philippe
> 
> 
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

end of thread, other threads:[~2004-02-05 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05  9:03 [U-Boot-Users] Pci multi bridge bug Philippe Simal
2004-02-05  9:27 ` Wolfgang Denk
2004-02-05 13:34 ` Travis Sawyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.