Dear NXP team,
I am using i.MX8M mini and Linux kernel is version 5.4.47.
I am suspend and resume in my Linux system.
Sometimes, when Linux resumes, hits the following message and stops the systems.
imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
My operations are as follows.
(1)Resume setting with "rtcwake" command.
(2)Suspend with "systemctl suspend" command.
(3)When resuming, the following message may be displayed(TIMEOUT of SDMA)
imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
I checked the SDMA registers when TIMEOUT occurred, they were as follows.
(Difference of registers when TIMEOUT occured and NORMAL(not occurred).)
Channel Stop/Channel Status (SDMAARM1_STOP_STAT), bit0(HE[0]):TIMEOUT=b1 / NORMAL=b0
Schedule Status (SDMAARM1_PSW), bit[15:13](NCP[2:0]):TIMEOUT=b111 / NORMAL=b000
OnCE Status Register (SDMAARM1_ONCE_STAT), bit[15:12](PST[3:0]):TIMEOUT=b0101 / NORMAL=b0110
I tried the following, but TIMEOUT is not resolved.
I extended timeout setting(500us->10s) in the sdma_run_channel0() of the Linux kernel source (/driver/dma/imx-sdma.c).
ret = readl_relaxed_poll_timeout_atomic(sdma->regs + SDMA_H_STATSTOP,reg, !(reg & 1), 1, 10000000); // default 500
Any causes what could be causing this issue?
Also, is there a way to work around this issue, or a way to recover if it occurs?