linux-stable/drivers/mtd/spi-nor
Fabio Estevam 6898b240f8 mtd: fsl-quadspi: Distinguish the mtd device names
Currently on a imx6sx-sdb board, which has two SPI NOR chips connected
to QSPI2 the following output from /proc/mtd is seen:

dev:    size   erasesize  name
mtd0: 01000000 00010000 "21e4000.qspi"
mtd1: 01000000 00010000 "21e4000.qspi"

Attempts to partition them on the kernel command line result in both
chips with identical (and identically named) partitions, which is
an inconvenient behavior.

Assign a different mtd->name for each mtd device to avoid this problem.

After this change the output from /proc/mtd becomes:

dev:    size   erasesize  name
mtd0: 01000000 00010000 "21e4000.qspi-0"
mtd1: 01000000 00010000 "21e4000.qspi-1"

In order to keep mtdparts compatibility keep the mtd->name
unchanged when a single SPI NOR is present.

Reported-by: David Wolfe <david.wolfe@nxp.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-03-30 10:04:53 +02:00
..
aspeed-smc.c mtd: spi-nor: aspeed: set 4B setting for all chips 2017-08-14 17:23:50 +02:00
atmel-quadspi.c mtd: atmel-quadspi: Remove unneeded pinctrl header 2017-08-01 21:23:21 +02:00
cadence-quadspi.c mtd: spi-nor: cadence-quadspi: Add support for direct access mode 2018-01-07 18:54:58 +01:00
fsl-quadspi.c mtd: fsl-quadspi: Distinguish the mtd device names 2018-03-30 10:04:53 +02:00
hisi-sfc.c mtd: Convert to using %pOF instead of full_name 2017-08-15 14:00:43 +02:00
intel-spi-pci.c mtd: intel-spi: Add Intel Lewisburg PCH SPI super SKU PCI ID 2017-10-30 11:51:18 +01:00
intel-spi-platform.c spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
intel-spi.c spi-nor: intel-spi: Remove unused preopcodes field 2018-01-07 21:22:32 +01:00
intel-spi.h spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
Kconfig spi-nor: intel-spi: Remove EXPERT dependency 2017-10-25 00:17:34 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtk-quadspi.c mtd: mtk-nor: modify functions' name more generally 2018-01-14 16:14:06 +01:00
nxp-spifi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
spi-nor.c mtd: spi-nor: Add ISSI is25lp080d support 2017-12-28 12:26:05 +01:00
stm32-quadspi.c mtd: spi-nor: stm32-quadspi: fix prefetching outside fsize 2017-10-29 18:54:22 +01:00