]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: mmc_write: Write only single block at a time
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 2 Feb 2016 05:10:16 +0000 (10:40 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 2 Feb 2016 07:45:57 +0000 (08:45 +0100)
Write only single block at a time while doing write
operations mmc/SD/eMMC
This is workaround for an issue with multiple block write

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/mmc_write.c

index 221bf306cc5c6ec4d5d6c24d10d06f3a59432ad4..18cb94f1b0343aabf448a5ec819ce8ad21c30106 100644 (file)
@@ -179,6 +179,12 @@ ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt, const void *src)
        do {
                cur = (blocks_todo > mmc->cfg->b_max) ?
                        mmc->cfg->b_max : blocks_todo;
+               /*
+                * FIXME: Workaround to always use
+                * single block write instead of
+                * multiple block.
+                */
+               cur = 1;
                if (mmc_write_blocks(mmc, start, cur, src) != cur)
                        return 0;
                blocks_todo -= cur;