mtd: spi-nor: Move m25p80 code in spi-nor.c
authorBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 6 Aug 2019 05:10:40 +0000 (10:40 +0530)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 12 Aug 2019 07:54:12 +0000 (10:54 +0300)
commitb35b9a10362d203451d920d01ab8d6cd55cbaf2a
tree2fd177bda4ffe597cf2c826ccbbf54a1c7626ea6
parentf173f26a4d543fa57e6ed9505bbbbf9bec61f544
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>
drivers/mtd/devices/Kconfig
drivers/mtd/devices/Makefile
drivers/mtd/devices/m25p80.c [deleted file]
drivers/mtd/spi-nor/Kconfig
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h