From: Dhruva Gole <d-gole@ti.com>
To: Clark Wang <xiaoning.wang@nxp.com>, <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] spi: lpspi: disable lpspi module irq in DMA mode
Date: Fri, 5 May 2023 14:46:10 +0530 [thread overview]
Message-ID: <0608e366-1b0e-d387-569a-9ed123bc4d69@ti.com> (raw)
In-Reply-To: <20230505063557.3962220-1-xiaoning.wang@nxp.com>
On 05/05/23 12:05, Clark Wang wrote:
> When all bits of IER are set to 0, we still can observe the lpspi irq events
> when using DMA mode to transfer data.
>
> So disable irq to avoid the too much irq events.
>
> Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
> ---
> drivers/spi/spi-fsl-lpspi.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
> index f2341ab99556..4b70038ceb6b 100644
> --- a/drivers/spi/spi-fsl-lpspi.c
> +++ b/drivers/spi/spi-fsl-lpspi.c
> @@ -910,9 +910,14 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
> ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
> if (ret == -EPROBE_DEFER)
> goto out_pm_get;
> -
Any reason to delete this line?
> if (ret < 0)
> dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
> + else
> + /*
> + * disable LPSPI module IRQ when enable DMA mode successfully,
> + * to prevent the unexpected LPSPI module IRQ events.
> + */
> + disable_irq(irq);
Just wondering, have you actually seen any unexpected LPSPI module IRQ
events? If this was causing issues earlier then maybe add a fixes tag?
>
> ret = devm_spi_register_controller(&pdev->dev, controller);
> if (ret < 0) {
--
Thanks and Regards,
Dhruva Gole
next prev parent reply other threads:[~2023-05-05 9:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 6:35 [PATCH] spi: lpspi: disable lpspi module irq in DMA mode Clark Wang
2023-05-05 9:16 ` Dhruva Gole [this message]
2023-05-05 9:40 ` Clark Wang
2023-05-24 11:04 ` Mark Brown
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=0608e366-1b0e-d387-569a-9ed123bc4d69@ti.com \
--to=d-gole@ti.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=xiaoning.wang@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).