OSDN Git Service

mmc: block: Add cache barrier support
authorSahitya Tummala <stummala@codeaurora.org>
Thu, 28 May 2015 11:24:19 +0000 (16:54 +0530)
committerSubhash Jadavani <subhashj@codeaurora.org>
Tue, 31 May 2016 22:26:40 +0000 (15:26 -0700)
commit83ed2ae95e1dc8e07faa82f570cb7cbbc58754ff
tree7c4cee5cba969e5842e845de191b45f0319bc04f
parentc3475c87343ca5e78e1033612c604489d2fd6566
mmc: block: Add cache barrier support

eMMC cache barrier provides a way to perform delayed
and in-order flushing of cached data. Host can use this
to avoid flushing delays but still maintain the order
between the data requests in cache.

In case the device gets more barrier requests than it
supports, then a barrier request is treated as a normal flush
request in the device.

If the eMMC cache flushing policy is set to 1, then the device
inherently flushes all the cached requests in FIFO order. For such
devices, as per spec, it is redundant to send any barrier requests
to the device. This may add unnecessary overhead to both host and
the device. So make sure to not send barrier requests in such cases.

Change-Id: Ia7af316800a6895942d3cabcd64600d56fab25a6
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
drivers/mmc/card/block.c
drivers/mmc/core/core.c
drivers/mmc/core/mmc.c
include/linux/mmc/card.h
include/linux/mmc/core.h
include/linux/mmc/mmc.h