[PATCH 2/2] MTD: OneNAND: multiblock erase support

Mika Korhonen ext-mika.2.korhonen at nokia.com
Fri Sep 18 01:03:46 EDT 2009


Hunter Adrian (Nokia-D/Helsinki) wrote:
> Korhonen Mika.2 (EXT-Ardites/Oulu) wrote:
>   
>> Add support for multiblock erase command. OneNANDs (excluding Flex-OneNAND)
>> are capable of simultaneous erase of up to 64 eraseblocks which is much
>> faster.
>> This changes the erase requests for regions covering multiple eraseblocks
>> to be performed using multiblock erase.
>>
>> Signed-off-by: Mika Korhonen <ext-mika.2.korhonen at nokia.com>
>> ---
>>     
>
> A few comments below.
>
>   
[...]
> +		switch (state) {
> +		case FL_RESETING:
> +			intr_flags |= ONENAND_INT_RESET;
> +			break;
> +		case FL_PREPARING_ERASE:
> +			intr_flags |= ONENAND_INT_ERASE;
> +			break;
> +		case FL_VERIFYING_ERASE:
> +			i = 51;
>   
>
> I see 100us for this in some versions.  Perhaps Kyungmin can suggest
> a value.
>   
With the chip I had the actual time for 64-eb verify read was in the 
range of 20-30 us but you're right, there are chips for which the 
maximum time is specified to be 100 us. Is ok to just raise this to that 
value? Kyungmin?

[...]
>
>> +
>> +	/* loop over 64 eb batches */
>> +	while (len) {
>> +		struct erase_info verify_instr = *instr;
>> +		verify_instr.addr = addr;
>> +		verify_instr.len = 0;
>> +
>> +		eb_count = 0;
>> +
>> +		while (len > block_size &&
>> +		       eb_count < (MB_ERASE_MAX_BLK_COUNT - 1)) {
>>     
>
> According to the manual I have you cannot do a multiblock erase
> across a chip boundary, so you must exit this loop at the boundary too.
>   

Ok, does this apply DDP chips only?

br,
Mika



More information about the linux-mtd mailing list