devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mirela Rabulea <mirela.rabulea@nxp.com>
To: "mchehab@kernel.org" <mchehab@kernel.org>,
	Ming Qian <ming.qian@nxp.com>,
	"Mirela Rabulea (OSS)" <mirela.rabulea@oss.nxp.com>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"X.H. Bao" <xiahong.bao@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] media: imx-jpeg: Disable useless interrupt to avoid kernel panic
Date: Wed, 17 Aug 2022 21:24:52 +0000	[thread overview]
Message-ID: <a231331f2b78b907e7f1fd678828ad64fe48e17b.camel@nxp.com> (raw)
In-Reply-To: <20220804093841.31337-1-ming.qian@nxp.com>

On Thu, 2022-08-04 at 17:38 +0800, Ming Qian wrote:
> There is a hardware bug that the interrupt STMBUF_HALF may be
> triggered
> after or when disable interrupt.
> It may led to unexpected kernel panic.
> And interrupt STMBUF_HALF and STMBUF_RTND have no other effect.
> So disable them and the unused interrupts.
> 
> meanwhile clear the interrupt status when disable interrupt.
> 
> Signed-off-by: Ming Qian <ming.qian@nxp.com>

Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>

> ---
>  drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c
> b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c
> index 9418fcf740a8..ef28122a5ed4 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c
> @@ -76,12 +76,14 @@ void print_wrapper_info(struct device *dev, void
> __iomem *reg)
>  
>  void mxc_jpeg_enable_irq(void __iomem *reg, int slot)
>  {
> -	writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN));
> +	writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
> +	writel(0xF0C, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN));
>  }
>  
>  void mxc_jpeg_disable_irq(void __iomem *reg, int slot)
>  {
>  	writel(0x0, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN));
> +	writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
>  }
>  
>  void mxc_jpeg_sw_reset(void __iomem *reg)

      reply	other threads:[~2022-08-17 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04  9:38 [PATCH] media: imx-jpeg: Disable useless interrupt to avoid kernel panic Ming Qian
2022-08-17 21:24 ` Mirela Rabulea [this message]

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=a231331f2b78b907e7f1fd678828ad64fe48e17b.camel@nxp.com \
    --to=mirela.rabulea@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=mirela.rabulea@oss.nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=xiahong.bao@nxp.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).