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

Michal Suchanek hramrach at gmail.com
Mon Aug 17 09:44:34 PDT 2015


On 17 August 2015 at 18:27, Jonas Gorski <jogo at openwrt.org> wrote:
> Hi,
>
> 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.

WIth the bonus that you can move your boot partitions to another mtd
device with a one line change in dt.

It might be nice to add a warning when partitions are created and the
alias is not present.

Thanks

Michal



More information about the linux-mtd mailing list