From: James Le Cuirot <chewi@gentoo.org>
To: Niklas Cassel <niklas.cassel@axis.com>
Cc: <jingoohan1@gmail.com>, <pratyush.anand@gmail.com>,
<bhelgaas@google.com>, Joao Pinto <jpmpinto@gmail.com>,
<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: PCI: designware: check for iATU unroll support after initializing host
Date: Sat, 29 Oct 2016 15:01:36 +0100 [thread overview]
Message-ID: <20161029150136.29fa4b7f@symphony.aura-online.co.uk> (raw)
In-Reply-To: <1476482095-26289-1-git-send-email-niklass@axis.com>
In-Reply-To: <1476482095-26289-1-git-send-email-niklass@axis.com>
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
On Fri, 14 Oct 2016 23:54:55 +0200
Niklas Cassel <niklas.cassel@axis.com> wrote:
> From: Niklas Cassel <niklas.cassel@axis.com>
>
> dw_pcie_iatu_unroll_enabled reads a dbi_base register.
> Reading any dbi_base register before pp->ops->host_init has been
> called causes "imprecise external abort" on platforms like ARTPEC-6,
> where the PCIe module is disabled at boot and first enabled in
> pp->ops->host_init. Move dw_pcie_iatu_unroll_enabled to
> dw_pcie_setup_rc, since it is after pp->ops->host_init, but before
> pp->iatu_unroll_enabled is actually used.
>
> Fixes: a0601a470537 ("PCI: designware: Add iATU Unroll feature")
> Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
> Acked-by: Joao Pinto <jpinto@synopsys.com>
Tested-by: James Le Cuirot <chewi@gentoo.org>
My Utilite Pro was failing to boot and this fixed it so thanks.
> ---
> drivers/pci/host/pcie-designware.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c
> b/drivers/pci/host/pcie-designware.c index 035f50c03281..bed19994c1e9
> 100644 --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -637,8 +637,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
> }
> }
>
> - pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
> -
> if (pp->ops->host_init)
> pp->ops->host_init(pp);
>
> @@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
> {
> u32 val;
>
> + /* get iATU unroll support */
> + pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
> + dev_dbg(pp->dev, "iATU unroll: %s\n",
> + pp->iatu_unroll_enabled ? "enabled" : "disabled");
> +
> /* set the number of lanes */
> val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL);
> val &= ~PORT_LINK_MODE_MASK;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
next prev parent reply other threads:[~2016-10-29 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 21:54 [PATCH] " Niklas Cassel
2016-10-17 14:34 ` Joao Pinto
2016-10-29 14:01 ` James Le Cuirot [this message]
2016-11-02 15:48 ` Olof Johansson
2016-11-02 16:26 ` Bjorn Helgaas
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=20161029150136.29fa4b7f@symphony.aura-online.co.uk \
--to=chewi@gentoo.org \
--cc=bhelgaas@google.com \
--cc=jingoohan1@gmail.com \
--cc=jpmpinto@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=pratyush.anand@gmail.com \
/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
Powered by JetHome