linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Sekhar Nori <nsekhar@ti.com>, Suman Anna <s-anna@ti.com>,
	<d-gerlach@ti.com>, Tony Lindgren <tony@atomide.com>,
	Bjorn Helgaas <bhelgaas@google.com>, <richardcochran@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	<linux-omap@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] pci: dra7xx: use pdata callbacks to perform reset
Date: Tue, 1 Mar 2016 17:25:56 +0530	[thread overview]
Message-ID: <56D5834C.5030800@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1603010825090.14948@utopia.booyaka.com>

Hi,

On Tuesday 01 March 2016 01:55 PM, Paul Walmsley wrote:
> 
> Folks, the following is what I've queued for this.

Thanks Paul.

Bjorn,

With this patch merged, enabling pci-dra7xx won't result in system freeze
anymore. I can send a patch to revert depends on BROKEN.

Thanks
Kishon

> 
> 
> - Paul
> 
> 
> From: Sekhar Nori <nsekhar@ti.com>
> Date: Thu, 18 Feb 2016 16:49:56 +0530
> Subject: [PATCH] ARM: DRA7: hwmod: Add custom reset handler for PCIeSS
> 
> Add a custom reset handler for DRA7x PCIeSS. This
> handler is required to deassert PCIe hardreset lines
> after they have been asserted.
> 
> This enables the PCIe driver to access registers after
> PCIeSS has been runtime enabled without having to
> deassert hardreset lines itself.
> 
> With this patch applied, used lspci to make sure
> connected PCIe device enumerates on DRA74x and DRA72x
> EVMs.
> 
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Reported-by: Richard Cochran <richardcochran@gmail.com>
> Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Suman Anna <s-anna@ti.com>
> Cc: Dave Gerlach <d-gerlach@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index b61355e2a771..252b74633e31 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -1526,8 +1526,31 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
>   *
>   */
>  
> +/*
> + * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
> + * functionality of OMAP HWMOD layer does not deassert the hardreset lines
> + * associated with an IP automatically leaving the driver to handle that
> + * by itself. This does not work for PCIeSS which needs the reset lines
> + * deasserted for the driver to start accessing registers.
> + *
> + * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
> + * lines after asserting them.
> + */
> +static int dra7xx_pciess_reset(struct omap_hwmod *oh)
> +{
> +	int i;
> +
> +	for (i = 0; i < oh->rst_lines_cnt; i++) {
> +		omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
> +		omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
> +	}
> +
> +	return 0;
> +}
> +
>  static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
>  	.name	= "pcie",
> +	.reset	= dra7xx_pciess_reset,
>  };
>  
>  /* pcie1 */
> 

  reply	other threads:[~2016-03-01 11:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 14:11 [PATCH v3 0/3] dra7xx: get pcie working in mainline Kishon Vijay Abraham I
2016-01-14 14:11 ` [PATCH v3 1/3] ARM: DRA7: hwmod: Add reset data for PCIe Kishon Vijay Abraham I
2016-02-08  1:50   ` Paul Walmsley
2016-01-14 14:11 ` [PATCH v3 2/3] ARM: DRA7: add pdata-quirks to do reset of PCIe Kishon Vijay Abraham I
2016-01-15 19:19   ` Suman Anna
2016-01-15 19:22     ` Tony Lindgren
2016-01-15 19:41       ` Suman Anna
2016-01-18  9:12         ` Sekhar Nori
2016-01-27 17:23           ` Tony Lindgren
2016-01-14 14:11 ` [PATCH v3 3/3] pci: dra7xx: use pdata callbacks to perform reset Kishon Vijay Abraham I
2016-01-27 17:31   ` Tony Lindgren
2016-01-27 18:16     ` Suman Anna
2016-01-27 18:56       ` Tony Lindgren
2016-01-27 23:16         ` Suman Anna
2016-01-28 18:31           ` Tony Lindgren
2016-01-28 21:15             ` Suman Anna
2016-02-02 10:40             ` Kishon Vijay Abraham I
2016-02-05  4:19               ` Kishon Vijay Abraham I
2016-02-08  2:48               ` Paul Walmsley
2016-02-08 20:56                 ` Suman Anna
2016-02-09  8:49                   ` Paul Walmsley
2016-02-09 17:40                     ` Suman Anna
2016-02-09 19:36                       ` Paul Walmsley
2016-02-10  1:42                         ` Suman Anna
2016-02-10  5:38                           ` Kishon Vijay Abraham I
2016-02-11 19:27                             ` Paul Walmsley
2016-02-11 22:04                               ` Suman Anna
2016-02-12  6:49                               ` Kishon Vijay Abraham I
2016-02-12 17:20                                 ` Suman Anna
2016-02-18 14:21                                   ` Sekhar Nori
2016-02-18 17:23                                     ` Paul Walmsley
2016-02-18 18:27                                       ` Suman Anna
2016-02-22  6:18                                     ` Kishon Vijay Abraham I
2016-02-22  6:31                                       ` Paul Walmsley
2016-02-22  9:55                                         ` Kishon Vijay Abraham I
2016-02-23 11:57                                           ` Kishon Vijay Abraham I
2016-02-23 18:28                                             ` Paul Walmsley
2016-02-24  6:21                                               ` Kishon Vijay Abraham I
2016-03-01  8:25                                                 ` Paul Walmsley
2016-03-01 11:55                                                   ` Kishon Vijay Abraham I [this message]
2016-03-01 14:43                                                     ` Bjorn Helgaas
2016-03-01 16:55                                                     ` Suman Anna
2016-02-11 20:43                             ` Suman Anna
2016-02-12  6:55                               ` Kishon Vijay Abraham I
2016-02-10  5:36                         ` Kishon Vijay Abraham I

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=56D5834C.5030800@ti.com \
    --to=kishon@ti.com \
    --cc=bhelgaas@google.com \
    --cc=d-gerlach@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=paul@pwsan.com \
    --cc=richardcochran@gmail.com \
    --cc=s-anna@ti.com \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).