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

Re: flash_safe_acquire

finn.hakansson@xxxxxxx.com said:
>  Those functions are for locking and unlocking of the flash chip, i.e.
> semaphores. (At least in Axis's code.) The flash chip is locked and
> unlocked automatically during a read, write or an erase for instance.
> After you have called flash_safe_acquire() you can do other stuff like
> accessing individual bytes on the flash etc. flash_safe_acquire() and
> flash_safe_release() are used in jffs_scan_flash() for example. 


	#define flash_safe_acquire(arg) 
	#define flash_safe_release(arg) 

Arbitration of access to the flash chips is handled correctly by the MTD 
device driver - which can handle interrupting erases to allow reads or even 
writes on some chips, etc. 

So flash_safe_acquire() and flash_safe_release() aren't needed to prevent 
the chip itself from getting confused by two concurrent access requests.

But is it needed at a higher level to ensure consistency of the data on the 
flash - e.g. to ensure that two consecutive MTD_WRITE() calls are in effect 

If so, we need to put make it something other than a NOP.