diff options
author | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
commit | bb39b8d99aae1f7eb13a97bd874838da91080de6 (patch) | |
tree | 3046f53937c0bc5dc13e2b2ab7b688a1932199bf /target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch | |
parent | c6c0d09f85c211560a1405441925681cfa25e8b1 (diff) | |
download | upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.gz upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.bz2 upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.zip |
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y
rebased against linux-3.10.y stable (3.10.32). This should hopefully
make it easier for us in the future to leverage the raspberry/rpi-*
branches.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39770
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch')
-rw-r--r-- | target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch b/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch new file mode 100644 index 0000000000..f7abfadd6c --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch @@ -0,0 +1,49 @@ +From 9f5c2a77277b99949398e97cc753074d1b8e9521 Mon Sep 17 00:00:00 2001 +From: popcornmix <popcornmix@gmail.com> +Date: Wed, 3 Jul 2013 00:42:49 +0100 +Subject: [PATCH 022/174] sdhci-bcm2708: use multiblock-type transfers for + single blocks + +There are issues with both single block reads (missed completion) +and writes (data loss in some cases!). Just don't do single block +transfers anymore, and treat them like multiblock transfers. This +adds a quirk for this and uses it. +--- + drivers/mmc/card/block.c | 2 +- + drivers/mmc/host/sdhci-bcm2708.c | 3 +++ + include/linux/mmc/host.h | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -1333,7 +1333,7 @@ static void mmc_blk_rw_rq_prep(struct mm + brq->data.blocks = 1; + } + +- if (brq->data.blocks > 1 || do_rel_wr) { ++ if (brq->data.blocks > 1 || do_rel_wr || card->host->caps2 & MMC_CAP2_FORCE_MULTIBLOCK) { + /* SPI multiblock writes terminate using a special + * token, not a STOP_TRANSMISSION request. + */ +--- a/drivers/mmc/host/sdhci-bcm2708.c ++++ b/drivers/mmc/host/sdhci-bcm2708.c +@@ -1266,6 +1266,9 @@ static int sdhci_bcm2708_probe(struct pl + + if (allow_highspeed) + host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; ++ ++ /* single block writes cause data loss with some SD cards! */ ++ host->mmc->caps2 |= MMC_CAP2_FORCE_MULTIBLOCK; + #endif + + ret = sdhci_add_host(host); +--- a/include/linux/mmc/host.h ++++ b/include/linux/mmc/host.h +@@ -281,6 +281,7 @@ struct mmc_host { + #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ + MMC_CAP2_PACKED_WR) + #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ ++#define MMC_CAP2_FORCE_MULTIBLOCK (1 << 31) /* Always use multiblock transfers */ + + mmc_pm_flag_t pm_caps; /* supported pm features */ + |