[PATCH 1/3] mtd: rawnand: cadence: support deferred prob when DMA is not ready

From: niravkumar . l . rabara
Date: Wed Jan 08 2025 - 08:58:30 EST


From: Niravkumar L Rabara <niravkumar.l.rabara@xxxxxxxxx>

Use deferred driver probe in case the DMA driver is not probed.
When ARM SMMU is enabled, all peripheral device drivers, including NAND,
are probed earlier than the DMA driver.

Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@xxxxxxxxx>
---
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;
goto disable_irq;
}
}
--
2.25.1