Hi,
I have recently updated my distro version for being generated with Yocto Sumo instead of Yocto Rocko. After launching kernel I begin receiving messages complaining about sdma in serial ports:
imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21f0000.serial: Prepare for the RX slave dma failed! imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21fc000.serial: Prepare for the RX slave dma failed! imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21fc000.serial: We cannot prepare for the TX slave dma! imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21fc000.serial: We cannot prepare for the TX slave dma! imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21f4000.serial: Prepare for the RX slave dma failed! imx-sdma 20ec000.sdma: sdma firmware not ready! imx-uart 21f4000.serial: We cannot prepare for the TX slave dma! imx-sdma 20ec000.sdma: sdma firmware not ready!
Same image with kernel 4.9.88 has no problems with serial ports. Any idea?
Thanks
已解决! 转到解答。
Hello Juan Alfonso,
The version of linux that you are updating it is only for i.MX8 Devices, we do not have support for i.MX6 with this distros, the HW it is very different from i.Mx6 and i.MX8 so the SDMA should be a problem for the i.MX8.
You cannot update the i.MX6 to Linux 4.14
I meet the same problem on sumo-4.14 imx6solo.
I think the root case is because the sdma need load firmware which is in rootfs, so some bus like SPI which need use sdma will meet error. Most time we need do some spi read operation in probe, we can't wait rootfs run.
I think there are many ways to fix them, some guys had described.
1. make the spi device to module, we can run it very late in init---------------but it is too strong coupling for kernel and rootfs.
2. call the spi_register_driver() function at the end of sdma_load_firmware()---------------but it is too strong coupling for spi driver and sdma driver.
3. don't use sdma in spi. just modify .has_dmamode = false in file spi-imx.c-----------------maybe some big number bytes transport will be low efficient, but most device is acceptable.
I choose 3.
I would also assume that it's not legal to link the SDMA firmware files inside the kernel image. I see the following options:
I personally use option 1. Loading the SDMA driver as a kernel module should also work, if SDMA client drivers (e.g. UART or SPI) are compiled as built in. Most client drivers allocate SDMA channels first when actually data is transferred (not on driver initialization). The imx serial driver will never use SDMA for the console UART. But it will use SDMA for other UARTs if configured in device tree.
The GA release of BSP 4.14.78 is valid for all released i.MX 6/7/8 platforms (and some non-released i.MX 8 platforms).
We received this problem report as well from someone using the 6UL.
We did a test with our pre-build image for the 6UL EVK and the SDMA firmware is loaded correctly:
[ 0.657183] imx-sdma 20ec000.sdma: Falling back to user helper
[ 19.846128] imx-sdma 20ec000.sdma: loaded firmware 3.4
Did you get this log as well when you boot your device? I expect not, because if it's loaded then it should be ready to be used.
Regards,
Bernhard.
[ 19.846128] imx-sdma 20ec000.sdma: loaded firmware 3.4
This is far too late for some use cases and AFAIK user mode helper for firmware loading is a bit deprecated nowadays ...
Even the newest mainline kernel has the opportunity to include the firmware in the kernel image, but
What is the reason to not built in SDMA firmware in kernel as done in older BSP versions?
This is the point. Built-in firmwares have been removed and everything was put out of the kernel git tree.
For more information on this you can consult:
As said in the documentation, you can add firmware by configuring the kernel when compliant with GPL. Sdma for imx6q binary is still available in kernel 4.1.15 from NXP, I haven't checked why NXP didn't added it back again in their repository.
Hello Juan Alfonso,
The version of linux that you are updating it is only for i.MX8 Devices, we do not have support for i.MX6 with this distros, the HW it is very different from i.Mx6 and i.MX8 so the SDMA should be a problem for the i.MX8.
You cannot update the i.MX6 to Linux 4.14
You should add the following code to you device tree:
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
/* note: imx_startup() will not enable DMA if UART is used as a console */
/* 4 MCU domain UART */
/* 5 Shared UART */
/* 2 Low priority */
dmas = <&sdma 25 5 2>, <&sdma 26 5 2>;
dma-names = "rx", "tx";
status = "okay";
};
You have to modify the "dmas" entry accoding to you system.
Please let me know whether this answers you question.
very appreciate for your answer.
i use another way to fix the problem。because it is emergency,i have no time to try your suggestion yet.
my board is base on imx6sllevk .and i use the 4.14.78 yocto。our uart and ssi both use the sdma。
copy your building project/all-poky-linux/firmware-imx/1_8.0-r0/image/imx onto your sdcard/lib/firmware/ by manual.
then system will load the firmware automatically.
i guess the copy file imx-sdma-6q.bin is used for the sdma function.
our uart and ssi is working now.
in the future, if i tried ,i will let you know
best regards
zhang