All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-boot hangs on imx6 pci driver
Date: Tue, 27 May 2014 09:30:27 -0300	[thread overview]
Message-ID: <CAOMZO5DU_AbK59WuU8kypC4aoq0KmCN9wa7oFMOHRyXaNEUWOQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2014-05-27 12:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 12:30 Fabio Estevam [this message]
2014-05-27 13:25 ` [U-Boot] U-boot hangs on imx6 pci driver 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

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=CAOMZO5DU_AbK59WuU8kypC4aoq0KmCN9wa7oFMOHRyXaNEUWOQ@mail.gmail.com \
    --to=festevam@gmail.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 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.