Subject: Re: RFC: Flash memory device API
To: Bucky Katz <>
From: Jared D. McNeill <>
List: tech-kern
Date: 09/05/2006 08:11:58
On 5-Sep-06, at 3:44 AM, Bucky Katz wrote:

> "Jared D. McNeill" <> writes:
> Your timing is fortunate. I've just started working on a NAND driver
> for an arm part and am inventing the same wheel, but for NAND, with no
> clear understanding of how to cope with raw NOR.

That's perfect, because I don't really know how to cope with NAND :-)

>> Externally, flash(4) exposes the following ioctl operations:
>> 	FLASH_ERASEBLOCK: erase a single block
>> 	FLASH_GBLOCKSTATUS: get the status of a single block
>> 	FLASH_SBLOCKSTATUS: set the status of a single block
>> 	FLASH_GETINFO: query flash device capabilities
> Not sure what you mean by "status".  I *assume* that by BLOCK you mean
> the erasable unit of the flash.  I've seen several naming schemes used
> so it would be good to specific what label you're going to use for the
> readable unit and what label for the erasable.  readable = sector,
> erasable = block is fine.

"status" can be one of:

> For NAND I would add two more:
>  	FLASH_READSPARE:  read the spare area
>  	FLASH_WRITESPARE: write the spare area

What exactly is the spare area?