[PATCH 1/2] mtd: spi-nor: make n_sectors in flash_info 32 bit wide

Marek Vasut marek.vasut at gmail.com
Fri Jan 20 16:25:15 PST 2017


On 01/20/2017 02:53 PM, Cyrille Pitchen wrote:
> Le 17/01/2017 à 11:47, Bastian Stender a écrit :
>> Hi Cyrille,
>>
>> On 01/16/2017 06:34 PM, Cyrille Pitchen wrote:
>>> Le 16/01/2017 à 16:12, Bastian Stender a écrit :
>>>> Since MRAM chips (like the Everspin mr25h40) are not sector
>>>> organized they should be defined as n_sectors * 1 byte sectors. To
>>>> be able to store the higher number of sectors n_sectors should be
>>>> an unsigned 32 bit integer just like sector_size.
>>>>
>>>
>>> Could you comment a little bit more on what this series improves or
>>> fixes?
>>
>> Sure. I want to create multiple writeable partitions on a mr25h40 MRAM
>> chip. This does not currently work because drivers/mtd/mtdpart.c makes sure
>> that partitions start on erase block boundaries and end on erase blocks.
>> That is obviously not the case for multiple partitions with the current
>> definition:
>>
> 
> OK now I better understand your issue so let's take it as a bug since it
> prevents you from using full features of the memory. However we have to be
> cautious because the modification you propose may have unwanted side
> effects hence may introduce some regressions.

This clearly feels like an improvement, not a bugfix .. unless I missed
something?

> For instance, currently the erase size >= page size. After your patch it
> will no longer be the case: I guess it should be OK for spi-nor.c but I
> have no real idea whether the upper mtd layers expect such a thing. We have
> to study!
> 
[...]


-- 
Best regards,
Marek Vasut



More information about the linux-mtd mailing list