[PATCH V6] mtd: m25p80: Modify the name of mtd_info

Hou Zhiqiang B48286 at freescale.com
Tue Aug 18 02:00:59 PDT 2015


Hi Brian,

> -----Original Message-----
> From: Brian Norris [mailto:computersforpeace at gmail.com]
> Sent: 2015年8月18日 9:30
> To: Jonas Gorski
> Cc: Hou Zhiqiang-B48286; MTD Maling List; David Woodhouse; Hu Mingkai-
> B21284; Rafa?? Mi??ecki; mike at steroidmicros.com
> Subject: Re: [PATCH V6] mtd: m25p80: Modify the name of mtd_info
> 
> On Mon, Aug 17, 2015 at 06:27:36PM +0200, Jonas Gorski wrote:
> > On Mon, Aug 17, 2015 at 6:27 AM, Zhiqiang Hou <B48286 at freescale.com>
> wrote:
> > > From: Hou Zhiqiang <B48286 at freescale.com>
> > >
> > > Set the mtd_info's name to a fixed one, so spi flash layouts can be
> > > specified by "mtdparts=..." in kernel cmdline, because the
> > > cmdlinepart's parser will match the name of mtd_info with the name
> > > given in cmdline.
> > >
> > > So far, if DT is used, the mtd_info's name will be set to the name
> > > of spi->dev. It includes spi_master->bus_num, and the bus_num may be
> > > dynamically allocated. So, replace the component bus_num with the
> > > physical address of spi controller.
> >
> > You can easily enforce fixed bus numers in linux using aliases in the
> > DT, this is supported by the spi core since v3.9 or so.
> 
> Interesting. Thanks for the suggestion. I haven't verified it myself, but
> if this is a workable solution, then I'd much prefer that to fiddling
> with the name here. So, tentative NAK.
> 
> > Also won't this change break it for everyone relying on the old naming
> > in their commandline mtdparts?
> 
> Yes, and that's been my comment on the first several versions. I didn't
> have time to bother repeating it on these latter revisions.

I had tried to add the 'bus_num' property to DT and handle in spi controller,
after a serious discussion, that patch was rejected due to the DT should describe
the hardware features and get a conclusion that we'd better reform the mtd_info's
name using phy-address of spi controller to consist with NOR and Nand flash.

The aliases id is a good choice to enforce fixed the bus numbers and it won't break
others' cmdline mtdparts.

Thanks,
Zhiqiang


More information about the linux-mtd mailing list