Skip to contentSkip to conversation

mtd: nand: raw: atmel: Add message on DMA usage

PATCH Superseded Alexander Dahl 3 participants 3 messages Aug 21, 2024 – Aug 23, 2024

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtd: nand: raw: atmel: Add message on DMA usage

Like for other atmel drivers (serial, crypto, mmc, …), too.

---

Notes:
v1 -> v2:
- make info message conditional (thanks Miquel)

 drivers/mtd/nand/raw/atmel/nand-controller.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/atmel/nand-controller.c +4 -1
index dc75d50d52e8..f9ccfd02e804 100644
@@ -2049,7 +2049,10 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
 		dma_cap_set(DMA_MEMCPY, mask);
 
 		nc->dmac = dma_request_channel(mask, NULL, NULL);
-		if (!nc->dmac)
+		if (nc->dmac)
+			dev_info(nc->dev, "using %s for DMA transfers\n",
+				 dma_chan_name(nc->dmac));
+		else
 			dev_err(nc->dev, "Failed to request DMA channel\n");
 	}
 

base-commit: 47ac09b91befbb6a235ab620c32af719f8208399

Signature · 1 line
2.39.2
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 5 lines · Alexander Dahl

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Like for other atmel drivers (serial, crypto, mmc, …), too.

Quoted 30 lines

---

Notes:
v1 -> v2:
- make info message conditional (thanks Miquel)

  drivers/mtd/nand/raw/atmel/nand-controller.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/atmel/nand-controller.c +4 -1
index dc75d50d52e8..f9ccfd02e804 100644
@@ -2049,7 +2049,10 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
                 dma_cap_set(DMA_MEMCPY, mask);
 
                 nc->dmac = dma_request_channel(mask, NULL, NULL);
-               if (!nc->dmac)
+               if (nc->dmac)
+                       dev_info(nc->dev, "using %s for DMA transfers\n",
+                                dma_chan_name(nc->dmac));
+               else
                         dev_err(nc->dev, "Failed to request DMA channel\n");
         }
 

base-commit: 47ac09b91befbb6a235ab620c32af719f8208399 --
2.39.2