[PATCH 2/2] mtd: spi-nor: fix mr25h* definitions

Marek Vasut marek.vasut at gmail.com
Wed Jan 18 07:57:33 PST 2017


On 01/17/2017 03:51 PM, Bastian Stender wrote:
> Hi Marek,

Hi!

> On 01/16/2017 05:07 PM, Marek Vasut wrote:
>> On 01/16/2017 04:12 PM, Bastian Stender wrote:
>>> The previous definitions for mr25h* chips lead to unnecessary limits
>>> regarding writesize and eraseblocksize for MRAM. MRAM is random access
>>> memory rather than page, sector, or block organized memory.
>>>
>>> Instead of 1 sector with 512KB the mr25h40 MRAM chip should be defined
>>> as 512K sectors with 1 byte each. This makes it writesize and
>>> eraseblocksize aligned and reflects MRAM functionality properly.
>>
>> Wouldn't this degrade the performance ? ie. if you write the flash, it
>> will send PP opcode + 1 byte in a loop, right ?
> 
> I don't think so, info->sector_size and info->n_sectors are used for
> calculating mtd->size and setting mtd->erasesize only. mtd->erasesize
> should be never used when SPI_NOR_NO_ERASE is set in info->flags as
> Cyrille pointed out.

Hmmm, does that answer my second question ?

-- 
Best regards,
Marek Vasut



More information about the linux-mtd mailing list