Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25, 35, 50, 51, 53} cspi devices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25, 35, 50, 51, 53} cspi devices
- From: Martin Kaiser <martin@xxxxxxxxx>
- Date: Wed, 15 May 2024 21:26:17 +0200
- Cc: imx@xxxxxxxxxxxxxxx, Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, linux-spi@xxxxxxxxxxxxxxx, Mark Brown <broonie@xxxxxxxxxx>, Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- In-reply-to: <ZkDq73W7MuyQ4RLj@akranes.kaiser.cx>
- References: <20240508095610.2146640-2-u.kleine-koenig@pengutronix.de> <ZjuB1Rjyu1ooYvDi@akranes.kaiser.cx> <a342h4qn2qkmeimbuanyqh6pxbpqvz7artmodnltcxtbzeo6qn@iyth4xit622f> <pof7t5skj6w7to75kynjtck5hh5whc2zm3k3cd3nsz6ogthxi3@2a6at3s4lfpy> <ZkDq73W7MuyQ4RLj@akranes.kaiser.cx>
Thus wrote Martin Kaiser (martin@xxxxxxxxx):
> > However this breaks SPI transfers, when I try to read out an MRAM I get:
> > root@ecu02:~ hexdump -C /dev/mtd4
> > [ 71.813807] spi_imx 43fa4000.spi: I/O Error in DMA TX
> > [ 71.819173] spi-nor spi0.2: SPI transfer failed: -110
> > [ 71.829129] spi_master spi0: failed to transfer one message from queue
> > [ 71.843962] spi_master spi0: noqueue transfer failed
> > So it would indeed be interesting if you ever managed to use DMA on
> > i.MX25.
> I believe so. Looking into my notes from 2016 (when I last tried this), I got
> the -110 error when the SMC bit in CONREG wasn't set. But this should now be
> done in mx31_prepare_transfer if DMA is used...
> I'll try to set up a test some time next week.
I can now reproduce the dma tx error. My test board uses a dummy spidev device
on cspi1 and configures loopback on the cspi1 controller (disabling loopback
makes no difference).
I'm relatively sure that this setup did work back in 2016/17.
Commit 24bb244e02a6 ("ARM: i.MX25: globally disable supervisor protect") was
required before any DMA transfers started working on imx25. As far as I can
see, this code is still present.
I'll look into this a bit more as time permits.
Martin
- References:
- [PATCH] spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
- Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
- Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25, 35, 50, 51, 53} cspi devices
- Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25, 35, 50, 51, 53} cspi devices
- Re: [PATCH] spi: imx: Don't expect DMA for i.MX{25, 35, 50, 51, 53} cspi devices
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|