|
|
Intel flash parts not performing buffered writes -- bug in mtd-flash or fs-flash3?
|
|
06/30/2009 8:54 PM
post32898
|
Intel flash parts not performing buffered writes -- bug in mtd-flash or fs-flash3?
We have Intel StrataFlash parts and are using the stock devf-generic. The flash is correctly recognized as 16-bit and
supporting buffered writes (f3s_iCFI_ident() finds dbase->buffer_size to be 64 and sets the F3S_WRITE_BUFFER on dbase->
flags).
However, I've stepped through the f3s_iCFI_v2write() code (at least that available from the MPC8641d BSP) when we're
doing flash writes on the raw flash device, and it is not using buffered writes (the (flags & F3S_WRITE_BUFFER) check fails). The call tree for our writes looks like:
f3s_raw_write() -> f3s_flash_write() ->
f3s_iCFI_v2write().
Grepping the fs-flash3 code, it looks like the "flags" parameter that is passed to f3s_iCFI_v2write() is the write_flags
parameter passed to f3s_flash_write(), which doesn't at all care about dbase->flags (it is always explicitly set to 0,
1, or F3S_VERIFY_WRITE when f3s_flash_write() is called) -- so the "buffered writes" path in f3s_iCFI_v2write() is never
taken.
Is this a bug in the fs-flash3 code (not correctly passing the F3S_WRITE_BUFFER flag) or in f3s_iCFI_v2write() (should
be checking (dbase->flags & F3S_WRITE_BUFFER) instead of (flags & F3S_WRITE_BUFFER))?
|
|
|
|
|