[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240620175657.358273-9-piotr.wojtaszczyk@timesys.com>
Date: Thu, 20 Jun 2024 19:56:39 +0200
From: Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>
To: Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
"J.M.B. Downing" <jonathan.downing@...tel.com>,
Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Russell King <linux@...linux.org.uk>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Andi Shyti <andi.shyti@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Arnd Bergmann <arnd@...db.de>,
Yangtao Li <frank.li@...o.com>,
Li Zetao <lizetao1@...wei.com>,
Chancel Liu <chancel.liu@....com>,
Michael Ellerman <mpe@...erman.id.au>,
dmaengine@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org,
linux-sound@...r.kernel.org,
linux-clk@...r.kernel.org,
linux-i2c@...r.kernel.org,
linux-mtd@...ts.infradead.org
Cc: Markus Elfring <Markus.Elfring@....de>
Subject: [Patch v4 08/10] mtd: rawnand: lpx32xx: Request DMA channels using DT entries
Move away from pl08x platform data towards device tree.
Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>
---
Changes for v4:
- This patch is new in v4
drivers/mtd/nand/raw/lpc32xx_mlc.c | 10 +---------
drivers/mtd/nand/raw/lpc32xx_slc.c | 10 +---------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c
index 677fcb03f9be..e504e3c5af11 100644
--- a/drivers/mtd/nand/raw/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c
@@ -574,15 +574,7 @@ static int lpc32xx_dma_setup(struct lpc32xx_nand_host *host)
struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
dma_cap_mask_t mask;
- if (!host->pdata || !host->pdata->dma_filter) {
- dev_err(mtd->dev.parent, "no DMA platform data\n");
- return -ENOENT;
- }
-
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
- host->dma_chan = dma_request_channel(mask, host->pdata->dma_filter,
- "nand-mlc");
+ host->dma_chan = dma_request_chan(mtd->dev.parent, "rx-tx");
if (!host->dma_chan) {
dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
return -EBUSY;
diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c
index 1c5fa855b9f2..f83a31411bde 100644
--- a/drivers/mtd/nand/raw/lpc32xx_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_slc.c
@@ -721,15 +721,7 @@ static int lpc32xx_nand_dma_setup(struct lpc32xx_nand_host *host)
struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
dma_cap_mask_t mask;
- if (!host->pdata || !host->pdata->dma_filter) {
- dev_err(mtd->dev.parent, "no DMA platform data\n");
- return -ENOENT;
- }
-
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
- host->dma_chan = dma_request_channel(mask, host->pdata->dma_filter,
- "nand-slc");
+ host->dma_chan = dma_request_chan(mtd->dev.parent, "rx-tx");
if (!host->dma_chan) {
dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
return -EBUSY;
--
2.25.1
Powered by blists - more mailing lists