[RFC] mtd-utils: add support for erase regions

Rotariu, Marian Marian_Rotariu at mentor.com
Thu Apr 21 07:34:09 PDT 2016


Hello all,

For the moment, mtd-utils does not take into consideration erase
regions, already used in some mtd kernel drivers. The only purpose for
the ioctl(MEMGETREGIONINFO) is for debugging or for dumping mtd info.

In one of the SoC that I use, there is a flash with multiple sector
sizes (4KB/64KB) and I mapped multiple config data in the area with 4KB
sizes for finer granularity. Unfortunately, I cannot use flash_erase or
any other mtd-utils tool to erase 4K-sectors where the data resides
because the mtd erasesize is 64KB (the "major"/default erase size for
the device). Therefore, every time I want to change something small I
have to delete an entire 64KB space and rewrite the necessary sectors. 

I created some patches that add support for erase regions in mtd-utils
and I thought of sharing them here. Are these modifications of interest
for the upstream mtd-utils?

Best Regards,
Marian Rotariu


More information about the linux-mtd mailing list