Other Parts Discussed in Thread: CSD
I've never spent much time looking into the kernel before, so please let me know if I'm way off base.
I'm working on an AM335x based board with a power supervisor and bulk capacitors such that there is 500+ ms between a power failure interrupt and board reset. Long story short, I'm trying to determine how to force the eMMC to flush its volatile cache within that time. I started by just looking at what happened when `sync` was executed from the Linux command prompt.
The issue I'm seeing is that I never see evidence of the eMMC being told to flush its cache (via the EXT_CSD_FLUSH_CACHE command). Specifically mmc_flush_cache() (in drivers/mmc/core/core.c) is never called if the block device queue hasn't had it's flush flags set. Further, the flush flags aren't set unless the MMC host driver indicates that it supports CMD23.
It seems that the AM335x supports CMD23, assuming that the MMC card does.
So, my question is, why does the omap_hsmmc driver not indicate that it supports the CMD23 capability in it's mmc_host structure?
On the other hand, I'm not exactly sure why CMD23 would be required so support EXT_CSD_FLUSH_CACHE. CMD23 seems to be related to reliable writes and seems that flush cache would specifically not be needed if CMD23 was used.
In general, though, am I just missing something? I have a hard time believing that the MMC volatile cache is never being explicitly flushed by the kernel.
Thanks,
-Chad