diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 23:59:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 23:59:45 -0400 |
commit | b5174fa3a7f4f8f150bfa3b917c92608953dfa0f (patch) | |
tree | 5efd32dd52fe55f760094e78f18acd3ff869751d /drivers/mmc/card | |
parent | afb9bd704c7116076879352a2cc2c43aa12c1e14 (diff) | |
parent | 135111cc5595c6a24dd826d503e2d2bae92da1c4 (diff) |
Merge tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC updates from Chris Ball:
Core:
* Support for MMC 4.5 Data Tag feature -- we tag REQ_META, so devices
that support Data Tag will provide increased throughput for metadata.
* Faster detection of card removal on I/O errors.
Drivers:
* dw_mmc now supports eMMC Power Off Notify, has PCI support, and
implements pre_req and post_req for asynchronous requests.
* omap_hsmmc now supports device tree.
* esdhc now has power management support.
* sdhci-tegra now supports Tegra30 devices.
* sdhci-spear now supports hibernation.
* tmio_mmc now supports using a GPIO for card detection.
* Intel PCH now supports 8-bit bus transfers.
* tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits)
mmc: sh_mmcif: simplify bitmask macros
mmc: sh_mobile_sdhi: support modular mmc-core with non-standard hotplug
mmc: sh_mobile_sdhi: add a callback for board specific init code
mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
mmc: sh_mobile_sdhi: do not manage PM clocks manually
mmc: tmio_mmc: remove unused sdio_irq_enabled flag
mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data
mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
mmc: tmio: calculate the native hotplug condition only once
mmc: simplify mmc_cd_gpio_request() by removing two parameters
mmc: sdhci-pci: allow 8-bit bus width for Intel PCH
mmc: sdhci: check interrupt flags in ISR again
mmc: sdhci-pci: Add MSI support
mmc: core: warn when card doesn't support HPI
mmc: davinci: Poll status for small size transfers
mmc: davinci: Eliminate spurious interrupts
mmc: omap_hsmmc: Avoid a regulator voltage change with dt
mmc: omap_hsmmc: Convert hsmmc driver to use device tree
mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIO
...
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 4c3b2847e47c..eed213a5c8cb 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1079,6 +1079,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | |||
1079 | struct mmc_blk_request *brq = &mqrq->brq; | 1079 | struct mmc_blk_request *brq = &mqrq->brq; |
1080 | struct request *req = mqrq->req; | 1080 | struct request *req = mqrq->req; |
1081 | struct mmc_blk_data *md = mq->data; | 1081 | struct mmc_blk_data *md = mq->data; |
1082 | bool do_data_tag; | ||
1082 | 1083 | ||
1083 | /* | 1084 | /* |
1084 | * Reliable writes are used to implement Forced Unit Access and | 1085 | * Reliable writes are used to implement Forced Unit Access and |
@@ -1155,6 +1156,16 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | |||
1155 | mmc_apply_rel_rw(brq, card, req); | 1156 | mmc_apply_rel_rw(brq, card, req); |
1156 | 1157 | ||
1157 | /* | 1158 | /* |
1159 | * Data tag is used only during writing meta data to speed | ||
1160 | * up write and any subsequent read of this meta data | ||
1161 | */ | ||
1162 | do_data_tag = (card->ext_csd.data_tag_unit_size) && | ||
1163 | (req->cmd_flags & REQ_META) && | ||
1164 | (rq_data_dir(req) == WRITE) && | ||
1165 | ((brq->data.blocks * brq->data.blksz) >= | ||
1166 | card->ext_csd.data_tag_unit_size); | ||
1167 | |||
1168 | /* | ||
1158 | * Pre-defined multi-block transfers are preferable to | 1169 | * Pre-defined multi-block transfers are preferable to |
1159 | * open ended-ones (and necessary for reliable writes). | 1170 | * open ended-ones (and necessary for reliable writes). |
1160 | * However, it is not sufficient to just send CMD23, | 1171 | * However, it is not sufficient to just send CMD23, |
@@ -1172,13 +1183,13 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | |||
1172 | * We'll avoid using CMD23-bounded multiblock writes for | 1183 | * We'll avoid using CMD23-bounded multiblock writes for |
1173 | * these, while retaining features like reliable writes. | 1184 | * these, while retaining features like reliable writes. |
1174 | */ | 1185 | */ |
1175 | 1186 | if ((md->flags & MMC_BLK_CMD23) && mmc_op_multi(brq->cmd.opcode) && | |
1176 | if ((md->flags & MMC_BLK_CMD23) && | 1187 | (do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) || |
1177 | mmc_op_multi(brq->cmd.opcode) && | 1188 | do_data_tag)) { |
1178 | (do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23))) { | ||
1179 | brq->sbc.opcode = MMC_SET_BLOCK_COUNT; | 1189 | brq->sbc.opcode = MMC_SET_BLOCK_COUNT; |
1180 | brq->sbc.arg = brq->data.blocks | | 1190 | brq->sbc.arg = brq->data.blocks | |
1181 | (do_rel_wr ? (1 << 31) : 0); | 1191 | (do_rel_wr ? (1 << 31) : 0) | |
1192 | (do_data_tag ? (1 << 29) : 0); | ||
1182 | brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC; | 1193 | brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC; |
1183 | brq->mrq.sbc = &brq->sbc; | 1194 | brq->mrq.sbc = &brq->sbc; |
1184 | } | 1195 | } |