[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87plkgpk8k.fsf@bootlin.com>
Date: Tue, 21 Jan 2025 10:52:11 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: niravkumar.l.rabara@...el.com
Cc: Richard Weinberger <richard@....at>, Vignesh Raghavendra
<vigneshr@...com>, linux@...blig.org, Shen Lichuan
<shenlichuan@...o.com>, Jinjie Ruan <ruanjinjie@...wei.com>,
u.kleine-koenig@...libre.com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2 1/3] mtd: rawnand: cadence: support deferred prob
when DMA is not ready
Hello,
On 16/01/2025 at 11:21:52 +08, niravkumar.l.rabara@...el.com wrote:
Typo (prob) in the title.
> From: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
>
> Use deferred driver probe in case the DMA driver is not probed.
Only devices are probed, not drivers.
> When ARM SMMU is enabled, all peripheral device drivers, including NAND,
> are probed earlier than the DMA driver.
>
> Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
> Cc: stable@...r.kernel.org
> Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
> ---
> drivers/mtd/nand/raw/cadence-nand-controller.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
> index 8d1d710e439d..5e27f5546f1b 100644
> --- a/drivers/mtd/nand/raw/cadence-nand-controller.c
> +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
> @@ -2908,7 +2908,7 @@ static int cadence_nand_init(struct cdns_nand_ctrl *cdns_ctrl)
> if (!cdns_ctrl->dmac) {
> dev_err(cdns_ctrl->dev,
> "Unable to get a DMA channel\n");
> - ret = -EBUSY;
> + ret = -EPROBE_DEFER;
Does it work if there is no DMA channel provided? The bindings do not
mention DMA channels as mandatory.
Also, wouldn't it be more pleasant to use another helper from the DMA
core that returns a proper return code? So we now which one among
-EBUSY, -ENODEV or -EPROBE_DEFER we get?
Thanks,
Miquèl
Powered by blists - more mailing lists