[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mtd: spi-nor: fix erase_type array to indicate current map conf
Hello Tudor,

On 23/11/2018 11:32, wrote:
>> I've tested this patch and it fixes the erasesize for S25FS128S and
>> our 128k partitions are writeable again with this patch.
> Good. You said that the flash is configured in non-uniform mapping (hybrid
> sector option). There is no uniform erase type that can erase the entire
> flash memory by its own, so the erase should be done using the non-uniform
> erase code (spi_nor_has_uniform_erase() should return false). Does the
> non-uniform erase work as expected?

unfortunately, it doesn't. I was too fast reporting the success...
So erasesize is back to the value before non-uniform support patches,
partitions are not made read only any more, but actual write or
erase still fails.

I'll investigate further.

Taking into account the comments from Boris, we probably need this patch

> For example, if the hybrid section is at the top of the address space, when
> using mtd_utils:
> $ mtd_debug erase /dev/your_mtd 4096 126976
> I would expect the use of the following erase types: 7*4k, 32k, 64k
> Then write and read back to check if the erase was done correctly:
> $ dd if=/dev/urandom of=in bs=4096 count=31
> $ mtd_debug write /dev/your_mtd 4096 126976 in
> $ mtd_debug read /dev/your_mtd 4096 126976 out
> $ sha1sum in out
> the output should be the same.
> Feel free to add some prints in the code to be sure that non-uniform erase code
> selects the correct erase types.

Best regards,
Alexander Sverdlin.
 \ /
  Last update: 2018-11-23 12:33    [W:0.080 / U:1.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site