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

Bastian Stender bst at pengutronix.de
Tue Jan 17 06:51:43 PST 2017


Hi Marek,

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.

Regards,
Bastian

-- 
Pengutronix e.K.
Industrial Linux Solutions
http://www.pengutronix.de/
Peiner Str. 6-8, 31137 Hildesheim, Germany
Amtsgericht Hildesheim, HRA 2686



More information about the linux-mtd mailing list