summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@kernel.org>2026-09-03 14:24:24 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-09-04 20:07:48 +0200
commitdef559a215699aa2f2d8ef98f30156b9d562a154 (patch)
tree81b09efa5b983b52f51c5f3827486c39a70542a0
parente18c514e9c1ff330bec87fd62341251d041e7443 (diff)
downloadlinux-next-def559a215699aa2f2d8ef98f30156b9d562a154.tar.gz
linux-next-def559a215699aa2f2d8ef98f30156b9d562a154.zip
mtd: rawnand: lpc32xx_mlc: Remove platform data support
Since NXP LPC32xx SoC support in the Linux kernel strictly depends on device tree support, the unused platform data support can be removed from the NAND MLC driver. Signed-off-by: Vladimir Zapolskiy <vz@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-rw-r--r--drivers/mtd/nand/raw/lpc32xx_mlc.c21
-rw-r--r--include/linux/mtd/lpc32xx_mlc.h17
2 files changed, 2 insertions, 36 deletions
diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c
index 8f6a89d9ba83..8436015edcb4 100644
--- a/drivers/mtd/nand/raw/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c
@@ -26,7 +26,6 @@
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
-#include <linux/mtd/lpc32xx_mlc.h>
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>
@@ -174,7 +173,6 @@ static struct nand_bbt_descr lpc32xx_nand_bbt_mirror = {
struct lpc32xx_nand_host {
struct platform_device *pdev;
struct nand_chip nand_chip;
- struct lpc32xx_mlc_platform_data *pdata;
struct clk *clk;
struct gpio_desc *wp_gpio;
void __iomem *io_base;
@@ -580,24 +578,11 @@ static void lpc32xx_ecc_enable(struct nand_chip *chip, int mode)
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;
host->dma_chan = dma_request_chan(mtd->dev.parent, "rx-tx");
if (IS_ERR(host->dma_chan)) {
- /* fallback to request using platform data */
- 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");
-
- if (!host->dma_chan) {
- dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
- return -EBUSY;
- }
+ dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
+ return PTR_ERR(host->dma_chan);
}
/*
@@ -736,8 +721,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
gpiod_set_consumer_name(host->wp_gpio, "NAND WP");
- host->pdata = dev_get_platdata(&pdev->dev);
-
/* link the private data structures */
nand_set_controller_data(nand_chip, host);
nand_set_flash_node(nand_chip, pdev->dev.of_node);
diff --git a/include/linux/mtd/lpc32xx_mlc.h b/include/linux/mtd/lpc32xx_mlc.h
deleted file mode 100644
index 35e971be0950..000000000000
--- a/include/linux/mtd/lpc32xx_mlc.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Platform data for LPC32xx SoC MLC NAND controller
- *
- * Copyright © 2012 Roland Stigge
- */
-
-#ifndef __LINUX_MTD_LPC32XX_MLC_H
-#define __LINUX_MTD_LPC32XX_MLC_H
-
-#include <linux/dmaengine.h>
-
-struct lpc32xx_mlc_platform_data {
- dma_filter_fn dma_filter;
-};
-
-#endif /* __LINUX_MTD_LPC32XX_MLC_H */