2

What is the functionality of mmc_flush_cache & mmc_cache_ctrl with MMC driver in linux.

I have found very little information on these, that mmc_flush_cache will flush the cache contents to the non volatile memory. But which cache memory they are referring to, whether MMC has it's own cache memory as like UFS device?

I need to copy the contents of cache to the MMC memory and from MMC memory to the cache. How I can achieve this in linux with the MMC driver.

Please suggest me the functions or API's using which I can do cache related operations in MMC driver.

Thanks in advance.

Udo
  • 449
  • 3
  • 13
user2706764
  • 67
  • 1
  • 4

1 Answers1

1

The cache referred to is indeed the on-board cache on the MMC device. the function mmc_flush_cache() is mapped to the EXT_CSD_FLUSH_CACHE MMC command.

Note that every MMC device does not have on-board cache and this command is not supported/implemented on devices that do not possess a cache.

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
  • Thanks for the reply. So, it means that MMC will be having it's own cache. And for transfering data from cache to the NV memory I can make use of the mmc_flush_cache API? And is there any funtion for transfering data from NV memory to cache means pre-fetch? Is there any tool for cache profiling after implementing? – user2706764 Aug 27 '13 at 10:12
  • In addition to the ones mentioned in your question, i do not know any functions to configure/control the mmc device cache explicitly. – TheCodeArtist Aug 28 '13 at 13:50