diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2023-03-13 14:41:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-17 12:10:57 +0100 |
commit | e94f4d57064b79ed0101224cd8bec5fe08ba903f (patch) | |
tree | b726648cf2e956a5e7f88a9950d1d123e802d695 /drivers | |
parent | b3bbee2823b2ca3100c8528218059d84e17b98be (diff) | |
download | barebox-e94f4d57064b79ed0101224cd8bec5fe08ba903f.tar.gz |
spi: remove flash_platform_data support
Drop the non-dt platform data since the last user was removed by commit
1266831db8 ("ARM: OMAP: PCM051: Remove spi platform data").
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20230228-v2023-02-0-topic-flexspi-v2-1-3d33126d2434@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 15 | ||||
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 4 | ||||
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 1 |
3 files changed, 2 insertions, 18 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 05c6473a28..ce3789c096 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -15,7 +15,6 @@ #include <driver.h> #include <of.h> #include <spi/spi.h> -#include <spi/flash.h> #include <xfuncs.h> #include <malloc.h> #include <errno.h> @@ -205,7 +204,6 @@ static int m25p_probe(struct device *dev) { struct spi_device *spi = (struct spi_device *)dev->type_data; struct spi_mem *spimem = spi->mem; - struct flash_platform_data *data; struct m25p *flash; struct spi_nor *nor; struct spi_nor_hwcaps hwcaps = { @@ -218,8 +216,6 @@ static int m25p_probe(struct device *dev) bool use_large_blocks; int ret; - data = dev->platform_data; - flash = xzalloc(sizeof *flash); nor = &flash->spi_nor; @@ -245,14 +241,7 @@ static int m25p_probe(struct device *dev) dev->priv = (void *)flash; - if (data && data->name) - flash->mtd.name = data->name; - - if (data && data->type) - flash_name = data->type; - else if (data && data->name) - flash_name = data->name; - else if (dev->id_entry) + if (dev->id_entry) flash_name = dev->id_entry->name; else flash_name = NULL; /* auto-detect */ @@ -267,8 +256,6 @@ static int m25p_probe(struct device *dev) device_id = DEVICE_ID_SINGLE; if (dev->of_node) flash_name = of_alias_get(dev->of_node); - else if (data && data->name) - flash_name = data->name; if (!flash_name) { device_id = DEVICE_ID_DYNAMIC; diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index b6a0c79d2f..b5dbe4de3e 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -17,7 +17,6 @@ #include <clock.h> #include <spi/spi.h> -#include <spi/flash.h> #include <linux/math64.h> #include <linux/mtd/mtd.h> @@ -599,7 +598,6 @@ add_dataflash_otp(struct spi_device *spi, char *name, { struct dataflash *priv; struct mtd_info *device; - struct flash_platform_data *pdata = spi->dev.platform_data; char *otp_tag = ""; int err = 0; @@ -617,7 +615,7 @@ add_dataflash_otp(struct spi_device *spi, char *name, name); device = &priv->mtd; - device->name = (pdata && pdata->name) ? pdata->name : "dataflash"; + device->name = "dataflash"; device->size = nr_pages * (uint64_t)pagesize; device->erasesize = pagesize; device->writesize = pagesize; diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index f83c3f02a0..8f6726ca4b 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -19,7 +19,6 @@ #include <linux/mtd/cfi.h> #include <linux/mtd/spi-nor.h> #include <of.h> -#include <spi/flash.h> #define SPI_NOR_MAX_ID_LEN 6 #define SPI_NOR_MAX_ADDR_WIDTH 4 |