Re: [PATCH v3 2/3] mtd: spi-nor: add 4bit block protection support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, February 10, 2020 12:29:34 PM EET Michael Walle wrote:
> > It's bytes. Take a look at W25Q128JV. The sector size for this flash is
> > 64KByte. The flash has 256 sectors. For this specific case:
> > bp_slots_available = 6;
> > bp_slots_needed = 8;
> > 
> > The if condition is true, so
> > bp_slot_count = 6;
> > bp_min_slot_size = 64k << (8 - 6); //256k
> 
> But nor->info->n_sectors is not 64k, its 256. Do you mean sector_size
> (like in
> my example below? Then we are on the same page 

Indeed, there is a typo in the pseudo code; I'm happy that the example is 
correct at least. I meant sector_size, not sectors. Now we should exercise the 
logic to all the known (corner) cases. Maybe Jungseung will tell us if he 
spots a flaw in the overall logic.

Cheers,
ta


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux