From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH][RFC] pci: Add check PCI bridge class (Re: [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge)
Date: Tue, 8 Jul 2008 11:27:30 +0200 [thread overview]
Message-ID: <200807081127.30810.sr@denx.de> (raw)
In-Reply-To: <29ab51dc0807072351n6a3d9c83vbd1454336193cff3@mail.gmail.com>
Hi Nobuhiro,
On Tuesday 08 July 2008, Nobuhiro Iwamatsu wrote:
> > c) CONFIG_PCI_CONFIG_HOST_BRIDGE is defined and the env variable
> > "pciconfighost" is defined too
> >
> > If I understand you correctly, then you have some PCI devices at BDF ==
> > 0,0,0 that need to be configured (and not skipped). Correct? If this is
> > correct, wouldn't it be enough for you to use "solution" c) from above?
>
> Yes, Your indication is right. And there was the part which I did not
> understand.
> But, I think that there is still a problem only by these measures.
>
> For example, BDF == 0,0,0 are not displayed when I validated
> CONFIG_PCI_SCAN_SHOW.
Right, this is a problem.
> 475 #ifdef CONFIG_PCI_SCAN_SHOW
> 476 /* Skip our host bridge */
> 477 if ( dev != PCI_BDF(hose->first_busno,0,0) ) {
> 478 unsigned char int_line;
> 479
> 480 pci_hose_read_config_byte(hose, dev,
> PCI_INTERRUPT_LINE, 481 &int_line);
> 482 printf(" %02x %02x %04x %04x %04x %02x\n",
> 483 PCI_BUS(dev), PCI_DEV(dev), vendor, device, class,
> 484 int_line);
> 485 }
> 486 #endif
>
> I think that it is a problem to handle only "BDF == 0,0,0".
> I think that I had better check it in Class ID.
> ?Of cource, I understand that my implementation is mean.?
Yes, switching to this class-ID check would be probably "cleaner". The main
problem I see with this is, that we could break backward compatibility. I
really don't know if all boards currently using this "Host-Bridge-Skipping"
implementation have the class-ID set to 0x0680 (Other bridge type).
So I suggest the following solution: I'll prepare a patch to move
this "Skip-device-check" into a separate weak function with the current
behavior. You (and others) can then define a custom "Skip-device-check"
function in your platform code that overrides this default function.
I'll send this patch to the list in a short while. Please try it out and let
me know if this works for you.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2008-07-08 9:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 11:20 [U-Boot-Users] PCI stopped working on MPC8343 Andre Schwarz
2008-04-18 14:17 ` Larry Johnson
2008-04-18 14:27 ` André Schwarz
2008-04-18 16:51 ` Larry Johnson
2008-04-18 14:57 ` Stefan Roese
2008-04-28 8:00 ` [U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge (Re: PCI stopped working on MPC8343) Nobuhiro Iwamatsu
2008-05-05 15:34 ` [U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge Larry Johnson
2008-05-05 18:41 ` Stefan Roese
2008-05-07 16:31 ` Anton Vorontsov
2008-05-09 2:01 ` Larry Johnson
2008-05-11 23:13 ` Wolfgang Denk
2008-05-12 13:43 ` Nobuhiro Iwamatsu
2008-05-12 18:32 ` Wolfgang Denk
2008-06-17 4:59 ` Nobuhiro Iwamatsu
2008-06-17 6:39 ` [U-Boot-Users] [PATCH][RFC] pci: Add check PCI bridge class (Re: [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge) Nobuhiro Iwamatsu
2008-07-07 13:58 ` Stefan Roese
2008-07-08 6:51 ` Nobuhiro Iwamatsu
2008-07-08 9:27 ` Stefan Roese [this message]
2008-07-05 22:32 ` [U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge Wolfgang Denk
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=200807081127.30810.sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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