Skip to content

Integrate meta-seco-imx/linux-seco-imx/niccolor/sdma-hang-during-boot

Commit: https://git.seco.com/edgehog/layers/seco/meta-seco-imx/-/commit/f8ad8a5dd9af3151c785a3c0929a7ee938fb8b75

Integrate linux-seco-imx/niccolor/sdma-hang-during-boot

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/e70e616a22307e84157eb5d236db863bb1bfa8a6

[PATCH] LF-5352: dmaengine: imx-sdma: fix the potential access registers without clock

The issue can be triggered with the sdma pm_runtime false.

If the dma client try to use sdma in boot phase, it may cause system hang. The sdma driver really enable clk after sdma load firmware, the clk_disable_unused will disable the SDMA1_ROOT_CLK before the sdma driver enable clk. This issue will comes if access the sdma register when the SDMA1_ROOT_CLK is disable.

This issue is very easy to reproduce with hdmi connected displayer on imx7d-sbd board which the i2c will use sdma early before sdma firmware loaded and clock enabled.

The client i2c calls dmaengine_prep_slave_single->device_prep_slave_sg ->sdma_prep_slave_sg->sdma_config_write->sdma_config_channel to get descriptor in boot phase. Then, the function sdma_config_channel will access sdma registers. If clk is disable will cause system hang.

This patch adds clk_enable and clk_disable to make sure the clk enable before access sdma hardware.

Signed-off-by: Joy Zou joy.zou@nxp.com Reviewed-by: Shengjiu Wang shengjiu.wang@nxp.com Reviewed-by: Dong Aisheng aisheng.dong@nxp.com Acked-by: Jason Liu jason.hui.liu@nxp.com

Merge request reports

Loading