All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] U-boot hangs on imx6 pci driver
@ 2014-05-27 12:30 Fabio Estevam
  2014-05-27 13:25 ` Marek Vasut
  2014-05-28 16:42 ` Fabio Estevam
  0 siblings, 2 replies; 22+ messages in thread
From: Fabio Estevam @ 2014-05-27 12:30 UTC (permalink / raw)
  To: u-boot

Hi,

Working on a mx6solo board with PCIe driver enabled in U-boot, I
notice that after doing several reboots a hang is seen on the PCIe
driver:

PCI Autoconfig: Bus Memory region: [0x1100000-0x1efffff],
                Physical Memory [1100000-1efffffx]
PCI Autoconfig: Bus I/O region: [0x1000000-0x10fffff],
                Physical Memory: [1000000-10fffff]
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc000
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc000
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc008
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
  00:01.0     - 16c3:abcd - Bridge device
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc008
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc004
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc010
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
PCI Autoconfig: BAR 0, I/O, size=0xfff4, address=0x1000000
bus_lower=0x100fff4### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config

### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc014
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc004
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
PCI Autoconfig: Found P2P bridge, device 1
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc004
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc018
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc018
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc018
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc020
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc024
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc024
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc01c
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc030
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1ffc004
### 5 -> imx_pcie_read_config
### OUT -> imx_pcie_read_config
### IN -> imx_pcie_write_config
### OUT -> imx_pcie_write_config
### IN -> imx_pcie_read_config
### 1 -> imx_pcie_read_config
### 2 -> imx_pcie_read_config
### 3 -> imx_pcie_read_config
### 4 -> imx_pcie_read_config - va_address = 0x 1f0000c

(Hang)

As a quick workaround I tried the following:

--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -385,7 +385,8 @@ static int imx_pcie_read_config(struct pci_controller *hose,
         */
        imx_pcie_fix_dabt_handler(true);
        writel(0xffffffff, val);
-       *val = readl(va_address);
+       if (0x01ffc000 <= va_address && va_address <= 0x01ffffff)
+               *val = readl(va_address);
        imx_pcie_fix_dabt_handler(false);

and the hang does not happen. However, not all devices connected to
the PCI switch can be discovered.

Any suggestions?

Thanks,

Fabio Estevam

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

end of thread, other threads:[~2014-06-20  0:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 12:30 [U-Boot] U-boot hangs on imx6 pci driver Fabio Estevam
2014-05-27 13:25 ` Marek Vasut
2014-05-27 14:43   ` "David Müller (ELSOFT AG)"
2014-05-27 14:56     ` Marek Vasut
2014-05-28  7:40       ` "David Müller (ELSOFT AG)"
2014-05-28 16:43         ` Fabio Estevam
2014-05-30  7:04           ` "David Müller (ELSOFT AG)"
2014-06-05  0:16             ` Tim Harvey
2014-06-05  6:30               ` "David Müller (ELSOFT AG)"
2014-06-05 10:13                 ` Tim Harvey
2014-06-20  0:11                   ` Marek Vasut
2014-06-05 15:27               ` Fabio Estevam
2014-06-05 17:53                 ` Marek Vasut
2014-06-05 19:20                   ` Fabio Estevam
2014-06-05 22:04                     ` Marek Vasut
2014-06-05 22:14                       ` Fabio Estevam
2014-06-05 22:15                         ` Marek Vasut
2014-06-06  4:35                 ` Tim Harvey
2014-06-17 14:14                   ` Fabio Estevam
2014-06-20  0:22                     ` Marek Vasut
2014-05-28 16:42 ` Fabio Estevam
2014-05-28 18:31   ` Marek Vasut

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.