All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Keerthy <j-keerthy@ti.com>, linux-omap@vger.kernel.org
Cc: afzal@ti.com, tony@atomide.com
Subject: Re: [PATCH 1/2] bus: omap_l3_noc: Add resume hook to restore context
Date: Mon, 10 Nov 2014 09:28:06 -0600	[thread overview]
Message-ID: <5460D986.7010907@ti.com> (raw)
In-Reply-To: <1415595784-5646-2-git-send-email-j-keerthy@ti.com>

On 11/09/2014 11:03 PM, Keerthy wrote:
> On certain SoCs such as AM437x SoC, L3_noc error registers are
> maintained in power domain such as per domain which looses context as part
> of low power state such as RTC+DDR mode. On these platforms when we
> mask interrupts which we cannot handle, the source of these interrupts
> still remain on resume, however, the flag mux registers now contain
> their reset value (unmasked) - this breaks the system with infinite
> interrupts since we do not these interrupts to take place ever again.
> 
> To handle this: restore the masking of interrupts which we have
> already recorded in the system as ones we cannot handle.
> 
> Fixes: 654fa7979b5db9a44b8 ("bus: omap_l3_noc: ignore masked out unclearable targets")
please use instead:
Fixes: 2100b595b7 ("bus: omap_l3_noc: ignore masked out unclearable
targets")

?


> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>  drivers/bus/omap_l3_noc.c |   55 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
> index 531ae59..b5eac29 100644
> --- a/drivers/bus/omap_l3_noc.c
> +++ b/drivers/bus/omap_l3_noc.c
> @@ -296,11 +296,66 @@ static int omap_l3_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> +#ifdef	CONFIG_PM
> +
> +/**
> + * l3_resume_noirq() - resume function for l3_noc
> + * @dev:	pointer to l3_noc device structure
> + *
> + * We only have the resume handler only since we
> + * have already maintained the delta register
> + * configuration as part of configuring the system
> + */
> +static int l3_resume_noirq(struct device *dev)
> +{
> +	struct omap_l3 *l3 = dev_get_drvdata(dev);
> +	int i;
> +	struct l3_flagmux_data *flag_mux;
> +	void __iomem *base, *mask_regx = NULL;
> +	u32 mask_val;
> +
> +	for (i = 0; i < l3->num_modules; i++) {
> +		base = l3->l3_base[i];
> +		flag_mux = l3->l3_flagmux[i];
> +		if (!flag_mux->mask_app_bits && !flag_mux->mask_dbg_bits)
> +			continue;
> +
> +		mask_regx = base + flag_mux->offset + L3_FLAGMUX_MASK0 +
> +			   (L3_APPLICATION_ERROR << 3);
> +		mask_val = readl_relaxed(mask_regx);
> +		mask_val &= ~(flag_mux->mask_app_bits);
> +
> +		writel_relaxed(mask_val, mask_regx);
> +		mask_regx = base + flag_mux->offset + L3_FLAGMUX_MASK0 +
> +			   (L3_DEBUG_ERROR << 3);
> +		mask_val = readl_relaxed(mask_regx);
> +		mask_val &= ~(flag_mux->mask_dbg_bits);
> +
> +		writel_relaxed(mask_val, mask_regx);
> +	}
> +
> +	/* Dummy read to force OCP barrier */
> +	if (mask_regx)
> +		(void)readl(mask_regx);
> +
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops l3_dev_pm_ops = {
> +	.resume_noirq		= l3_resume_noirq,
> +};
> +
> +#define L3_DEV_PM_OPS (&l3_dev_pm_ops)
> +#else
> +#define L3_DEV_PM_OPS NULL
> +#endif
> +
>  static struct platform_driver omap_l3_driver = {
>  	.probe		= omap_l3_probe,
>  	.driver		= {
>  		.name		= "omap_l3_noc",
>  		.owner		= THIS_MODULE,
> +		.pm		= L3_DEV_PM_OPS,
>  		.of_match_table = of_match_ptr(l3_noc_match),
>  	},
>  };
> 


-- 
Regards,
Nishanth Menon

  reply	other threads:[~2014-11-10 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  5:03 [PATCH 0/2] bus: omap_l3_noc: Add resume hook to restore mask registers Keerthy
2014-11-10  5:03 ` [PATCH 1/2] bus: omap_l3_noc: Add resume hook to restore context Keerthy
2014-11-10 15:28   ` Nishanth Menon [this message]
2014-11-10  5:03 ` [PATCH 2/2] bus: omap_l3_noc: Correct returning IRQ_HANDLED unconditionally in the irq handler Keerthy
2014-11-10 15:30   ` Nishanth Menon
2014-11-10 15:29 ` [PATCH 0/2] bus: omap_l3_noc: Add resume hook to restore mask registers Nishanth Menon

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=5460D986.7010907@ti.com \
    --to=nm@ti.com \
    --cc=afzal@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --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 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.