Hello Everyone,
I am working on imx7d, the kernel is 4.19.35-00034-g261c3547e33e-dirty.
I have written a slave driver, which can successfully send and receive 16 bytes of data. However, when I am trying to read data of 34 bytes. I am getting the following error.
imx-sdma 30bd0000.sdma: sdma firmware not ready!
maxq1744 spi3.0: SPI transfer failed: -22
spi_master spi3: failed to transfer one message from queue
Error while sending data = -22
When I initially did grep search on sdma I found this
root@qt850:~# dmesg | grep sdma
[ 0.383866] imx-sdma 30bd0000.sdma: no iram assigned, using external mem
[ 0.384229] imx-sdma 30bd0000.sdma: Falling back to syfs fallback for: imx/sdma/sdma-imx7d.bin
[ 6.024038] imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware
My device tree is as follows:
&ecspi4 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi4 &pinctrl_ecspi4_cs>;
cs-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
status = "okay";spidev1: spi@0 {
compatible = "quest,maxq1744";
reg = <0>;
spi-max-frequency = <100000>; /* MAXQ1744, When configured for SPI operation operates as an SPI slave,
supporting an SPI clock of up to 250 kHz*/
msr-supply = <&msr_power>;
rst-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /*An external reset is activated when the pin is held low for more than 400 μs.*/
interrupt-parent = <&gpio5>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
};
};
I get the interrupt correctly, I am just having issues when I am trying to read data greater than 16 bytes.
My question is as follows:
I am not using any dmas in my slave driver. Is it ok for transfer more than 16 bytes not to use dma?
What could possibly the reason for this error?
maxq1744 spi3.0: SPI transfer failed: -22
spi_master spi3: failed to transfer one message from queue
Looking forward to your response?
Regards,
Asma
Solved! Go to Solution.
Hi Asma
as workaround one can try to remove dma entries in dts file:
imx7s.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Asma
as workaround one can try to remove dma entries in dts file:
imx7s.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------