[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f7514c69d11a0377283fe52fa6e7558b75c7ad3.camel@pengutronix.de>
Date: Fri, 17 Oct 2025 11:47:50 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Artem Shimko <a.shimko.dev@...il.com>, Eugeniy Paltsev
<Eugeniy.Paltsev@...opsys.com>, Vinod Koul <vkoul@...nel.org>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] dmaengine: dw-axi-dmac: add reset control support
On Do, 2025-10-16 at 18:46 +0300, Artem Shimko wrote:
> Add proper reset control handling to the AXI DMA driver to ensure
> reliable initialization and power management. The driver now manages
> resets during probe, remove, and system suspend/resume operations.
>
> The implementation stores reset control in the chip structure and adds
> reset assert/deassert calls at the appropriate points: resets are
> deasserted during probe after clock acquisition, asserted during remove
> and error cleanup, and properly managed during suspend/resume cycles.
> Additionally, proper error handling is implemented for reset control
> operations to ensure robust behavior.
>
> This ensures the controller is properly reset during power transitions
> and prevents potential issues with incomplete initialization.
>
> Signed-off-by: Artem Shimko <a.shimko.dev@...il.com>
> ---
> .../dma/dw-axi-dmac/dw-axi-dmac-platform.c | 42 ++++++++++++-------
> drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 1 +
> 2 files changed, 27 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 8b7cf3baf5d3..ac23e1a5e218 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1321,6 +1321,8 @@ static int axi_dma_suspend(struct device *dev)
> axi_dma_irq_disable(chip);
> axi_dma_disable(chip);
>
> + reset_control_assert(chip->resets);
> +
> clk_disable_unprepare(chip->core_clk);
> clk_disable_unprepare(chip->cfgr_clk);
>
> @@ -1340,6 +1342,8 @@ static int axi_dma_resume(struct device *dev)
> if (ret < 0)
> return ret;
>
> + reset_control_deassert(chip->resets);
> +
Missing error handling, or at least inconsistent with the deassert
turing dw_probe().
regards
Philipp
Powered by blists - more mailing lists