CompactFlash ATA does have an "erase sectors" option but this is not really what you want (pre-erase sectors such that the next write will succeed without waiting for a flash erase).
I've seen a fair number of "raw flash" chips with that same semantic: writes to erased segments are faster. By a factor of about five, so it's well worth leveraging. In some cases that implies using different write procedures though ... so just having a "trim" hook isn't enough, the lowlevel code would need to know whether the area being written was already erased/trimmed.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds