JFFS2 NAND flash support
dwmw2 at infradead.org
Thu Mar 28 05:01:19 EST 2002
John.Hall at optionexist.co.uk said:
> Our hardware interface is a btit weird (ALE and CLE are controlled by
> address lines...). I also can get interrupts from the busy pin, so
> I've changed the code so it doesn't do busy waits as nand.c does.
Good. You can actually implement the async erases that the MTD erase API
was designed for.
You return zero from the erase() function to indicate that the request was
started OK, then later you set the instr->state to indicate whether the
erase succeeded or not, and call the callback.
The only thing to beware of is that users will currently not expect the
callback to be called in interrupt context; only in bottom half context -
and I'm thinking of changing that to allow only _process_ context. You can
use schedule_task() to schedule the callback from the interrupt handler.
More information about the linux-mtd