atmel-mci.c MMC_CAP_ERASE

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Posts: 2
Joined: Tue Feb 05, 2013 8:46 pm

atmel-mci.c MMC_CAP_ERASE

Wed Jun 24, 2015 9:50 pm

For SD cards to properly perform wear leveling the fstrim command must be used periodically. When we tried to trim our filesystem, I discovered that the driver wasn't setting the MMC_CAP_ERASE bit. Comments from when this feature was introduced (2010) seem to indicate that various drivers might expect timeouts or other issues that needed to be resolved.

I added the following to atmci_init_slot():

mmc->caps |= MMC_CAP_ERASE;

To my surprise, it seems to "just work". Perhaps the developers can comment on some obvious problem that I've missed? At any rate, I imagine Atmel will want to release someting, as trimming improved write performance and device longevity.

-Brian Hill

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests