Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511715

Re: PCI: designware: check for iATU unroll support after initializing host

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From James Le Cuirot <chewi@gentoo.org>
Newsgroups linux.kernel
Subject Re: PCI: designware: check for iATU unroll support after initializing host
Date Sat, 29 Oct 2016 16:10:01 +0200
Message-ID <sxCuB-7dM-9@gated-at.bofh.it> (permalink)
References <ssiGd-6ZK-7@gated-at.bofh.it>
X-Mailer Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; boundary="Sig_/ERpXAt=pJSGFSS_FdNGHc2."; protocol="application/pgp-signature"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 80
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Sat, 29 Oct 2016 15:01:36 +0100
X-Original-Message-ID <20161029150136.29fa4b7f@symphony.aura-online.co.uk>
X-Original-References <1476482095-26289-1-git-send-email-niklass@axis.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1511715

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: PCI: designware: check for iATU unroll support after  initializing host James Le Cuirot <chewi@gentoo.org> - 2016-10-29 16:10 +0200

csiph-web