[PATCH] [MTD] OneNAND: Invalidate bufferRAM after erase

Kyungmin Park kmpark at infradead.org
Thu Feb 8 19:16:43 EST 2007


Hi Adrian,

I checked it with pagetest module. Without the patch it failed.
I have two minor comments. 

Thank you,
Kyungmin Park

>  /**
> + * onenand_invalidate_bufferram_range - [GENERIC] Invalidate 
> BufferRAM information
> + * @param mtd		MTD data structure
> + * @param addr		start address to invalidate
> + * @param len		length to invalidate
> + *
> + * Invalidate BufferRAM information
> + */
> +static void onenand_invalidate_bufferram_range(struct 
> mtd_info *mtd, loff_t addr,
> +		unsigned int len)

It's name too long even though it invalidate with some range.
How about just call "onenand_invalidate_bufferram"?

> +/**
>   * onenand_get_device - [GENERIC] Get chip for selected access
>   * @param mtd		MTD device structure
>   * @param new_state	the state which is requested
> @@ -1466,6 +1489,8 @@ static int onenand_erase(struct mtd_info
>  			goto erase_exit;
>  		}
>  
> +		onenand_invalidate_bufferram_range(mtd, addr, 
> block_size);
> +
>  		this->command(mtd, ONENAND_CMD_ERASE, addr, block_size);

Place onenand_invalidate_bufferram_range here
Since erase command takes a long time, 2msec so we overlap the some cpu
works and onenand physicall works between command and wait.

>  
>  		ret = this->wait(mtd, FL_ERASING);





More information about the linux-mtd mailing list