On Mon, 05 May 2008 11:34:20 -0400
Larry Johnson <[EMAIL PROTECTED]> wrote:
>
> Hi Nobuhiro, Stefan, and everyone,
>
> Sorry for the delay in getting back to you. My mail reader thinks your
> patch is part of your signature, so I missed it the first time around.
>
> I did a quick check using the Sequoia board, and it looks like the patch
> isn't working there. U-Boot is reporting the class of the bridge as
> "0680", which I assume is why the patch doesn't skip it.
OK. I understood.
> Nobuhiro and Stefan, do you think we can get a working fix for this into
> 1.3.3 (even if it is not the final fix)? If not, we should patch
> Sequoia and Korat to add CONFIG_PCI_SKIP_HOST_BRIDGE so they won't be
> broken in that release.
Yes, I do not want to release the one that I broke, too.
I made the patch that applied your comment.
This patch skips PCI bridge ( Class code : 0x06XX).
Could you check this patch?
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
>From c81f6d7f7a1c730d1485b32650caf03dae8ee6f9 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <[EMAIL PROTECTED]>
Date: Mon, 12 May 2008 22:39:16 +0900
Subject: [PATCH] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge
Remove CONFIG_PCI_SKIP_HOST_BRIDGE from drivers/pci/pci.c.
Add check PCI class of host bridge(CPU to PCI bridge).
Signed-off-by: Nobuhiro Iwamatsu <[EMAIL PROTECTED]>
---
drivers/pci/pci.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7944b66..eab31e9 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,14 +425,15 @@ 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))
{
-
- /* Bus 0 is not necessarily PCI bridge. */
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
+ /* 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 */
+ if ( (dev == PCI_BDF(hose->first_busno,0,0)) &&
+ ((class & 0xFF00) == 0x0600) ) { /* CPU to PCI bridge */
+#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
/*
- * Only skip hostbridge configuration if "pciconfighost" is not set
+ * Only skip hostbridge configuration if
+ * "pciconfighost" is not set
*/
if (getenv("pciconfighost") == NULL) {
continue; /* Skip our host bridge */
@@ -441,8 +442,6 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
continue; /* Skip our host bridge */
#endif /* CONFIG_PCI_CONFIG_HOST_BRIDGE */
}
-#endif /* CONFIG_PCI_SKIP_HOST_BRIDGE */
-
if (PCI_FUNC(dev) && !found_multi)
continue;
@@ -477,11 +476,8 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
hose->fixup_irq(hose, dev);
#ifdef CONFIG_PCI_SCAN_SHOW
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
/* Skip our host bridge */
- if ( dev != PCI_BDF(hose->first_busno,0,0) )
-#endif
- {
+ if((class & 0xFF00) != 0x0600){ /* CPU to PCI bridge */
unsigned char int_line;
pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_LINE,
--
1.5.5.1
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users