[PATCH v6 1/2] mtd: fsl-quadspi: Distinguish the mtd device names

Boris Brezillon boris.brezillon at free-electrons.com
Thu Jan 25 02:33:17 PST 2018


On Thu, 25 Jan 2018 08:20:59 -0200
Fabio Estevam <festevam at gmail.com> wrote:

> Hi Boris,
> 
> On Thu, Jan 18, 2018 at 12:28 PM, Fabio Estevam <fabio.estevam at nxp.com> wrote:
> > Currently on a imx6sx-sdb board, which has two SPI NOR chips connected
> > to QSPI2 the following output from /proc/mtd is seen:
> >
> > # cat /proc/mtd
> > 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:
> >
> > # cat /proc/mtd
> > 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 at nxp.com>
> > Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
> > Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>
> > ---
> > Changes since v5:
> > - Preserve the label value, if any. (Boris)  
> 
> Do you plan to apply this one for 4.17?

I'm not applying spi-nor patches, and Cyrille already sent me his PR
for 4.16. So yes, I'd say it will be queued for 4.17. Is this a problem?



More information about the linux-mtd mailing list