Skip to content

Commit b35b9a1

Browse files
Boris Brezillonambarus
authored andcommitted
mtd: spi-nor: Move m25p80 code in spi-nor.c
The m25p80 driver is actually a generic wrapper around the spi-mem layer. Not only the driver name is misleading, but we'd expect such a common logic to be directly available in the core. Another reason for moving this code is that SPI NOR controller drivers should progressively be replaced by SPI controller drivers implementing the spi_mem_ops interface, and when the conversion is done, we should have a single spi-nor driver directly interfacing with the spi-mem layer. While moving the code we also fix a longstanding issue when non-DMA-able buffers are passed by the MTD layer. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent f173f26 commit b35b9a1

6 files changed

Lines changed: 605 additions & 394 deletions

File tree

‎drivers/mtd/devices/Kconfig‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,6 @@ config MTD_DATAFLASH_OTP
7979
other key product data. The second half is programmed with a
8080
unique-to-each-chip bit pattern at the factory.
8181

82-
config MTD_M25P80
83-
tristate "Support most SPI Flash chips (AT26DF, M25P, W25X, ...)"
84-
depends on SPI_MASTER && MTD_SPI_NOR
85-
select SPI_MEM
86-
help
87-
This enables access to most modern SPI flash chips, used for
88-
program and data storage. Series supported include Atmel AT26DF,
89-
Spansion S25SL, SST 25VF, ST M25P, and Winbond W25X. Other chips
90-
are supported as well. See the driver source for the current list,
91-
or to add other chips.
92-
93-
Note that the original DataFlash chips (AT45 series, not AT26DF),
94-
need an entirely different driver.
95-
96-
Set up your spi devices with the right board-specific platform data,
97-
if you want to specify device partitioning or to use a device which
98-
doesn't support the JEDEC ID instruction.
99-
10082
config MTD_MCHP23K256
10183
tristate "Microchip 23K256 SRAM"
10284
depends on SPI_MASTER

‎drivers/mtd/devices/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ obj-$(CONFIG_MTD_MTDRAM) += mtdram.o
1212
obj-$(CONFIG_MTD_LART) += lart.o
1313
obj-$(CONFIG_MTD_BLOCK2MTD) += block2mtd.o
1414
obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
15-
obj-$(CONFIG_MTD_M25P80) += m25p80.o
1615
obj-$(CONFIG_MTD_MCHP23K256) += mchp23k256.o
1716
obj-$(CONFIG_MTD_SPEAR_SMI) += spear_smi.o
1817
obj-$(CONFIG_MTD_SST25L) += sst25l.o

‎drivers/mtd/devices/m25p80.c‎

Lines changed: 0 additions & 347 deletions
This file was deleted.

‎drivers/mtd/spi-nor/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
menuconfig MTD_SPI_NOR
33
tristate "SPI-NOR device support"
44
depends on MTD
5+
depends on MTD && SPI_MASTER
6+
select SPI_MEM
57
help
68
This is the framework for the SPI NOR which can be used by the SPI
79
device drivers and the SPI-NOR device driver.

0 commit comments

Comments
 (0)