From: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
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, 17 Jun 2008 15:39:30 +0900 [thread overview]
Message-ID: <48575C22.3030604@renesas.com> (raw)
In-Reply-To: <bc6f41e00806162159hc396149sf11ac0e2497a6b13@mail.gmail.com>
Nobuhiro Iwamatsu wrote:
> Hi, all.
>
> 2008/5/13 Wolfgang Denk <wd@denx.de>:
>> In message <20080512224352.a3823c7a.iwamatsu@nigauri.org> you wrote:
>>> I made the patch that applied your comment.
>>> This patch skips PCI bridge ( Class code : 0x06XX).
>>>
>>> Could you check this patch?
>> Thanks - but note that this will not make it in the v1.3.3 release in
>> any case.
>
> Does the developer and Board maintainer get a problem with this patch?
> Would you test this patch?
Sorry , I forgot attached patch.
Best regards,
Nobuhiro
---
In current source code, when the device number of PCI is 0, process PCI
bridge without fail. However, when the device number is 0, it is not PCI
always bridge. There are times when device of PCI allocates.
This patch add check PCI bridge class.
- 0x0604 PCI to AGP bridge / PCI to PCI bridge
- 0x0605 PCI to PCMCIA bridge
- 0x0606 Nu Bus bridge
- 0x0607 PCMCIA CardBus controller
- 0x0608 RACEWay bridge
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
---
drivers/pci/pci.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b3ae3b1..39ca130 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,14 +425,21 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
dev < PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
dev += PCI_BDF(0,0,1))
{
+ /* Read class register */
+ pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, &class);
/* Skip our host bridge */
- if ( dev == PCI_BDF(hose->first_busno,0,0) ) {
-#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
- /*
- * Only skip hostbridge configuration if "pciconfighost" is not set
- */
- if (getenv("pciconfighost") == NULL) {
- continue; /* Skip our host bridge */
+ if (dev == PCI_BDF(hose->first_busno,0,0)) {
+ /* CPU to PCI bridge check */
+ if (((class & 0xFF00) == 0x0600) && (class != 0x0680))
+#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
+ {
+ /*
+ * Only skip hostbridge configuration if
+ * "pciconfighost" is not set
+ */
+ if (getenv("pciconfighost") == NULL) {
+ continue; /* Skip our host bridge */
+ }
}
#else
continue; /* Skip our host bridge */
@@ -474,7 +481,7 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
#ifdef CONFIG_PCI_SCAN_SHOW
/* Skip our host bridge */
- if ( dev != PCI_BDF(hose->first_busno,0,0) ) {
+ if (((class & 0xFF00) != 0x0600) || (class == 0x0680)) {
unsigned char int_line;
pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_LINE,
-- 1.5.5.1
next prev parent reply other threads:[~2008-06-17 6:39 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 ` Nobuhiro Iwamatsu [this message]
2008-07-07 13:58 ` [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) Stefan Roese
2008-07-08 6:51 ` Nobuhiro Iwamatsu
2008-07-08 9:27 ` Stefan Roese
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=48575C22.3030604@renesas.com \
--to=iwamatsu.nobuhiro@renesas.com \
--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