]> git.sur5r.net Git - u-boot/commit
mmc: sd: optimize erase
authorPeng Fan <van.freenix@gmail.com>
Thu, 1 Sep 2016 03:13:39 +0000 (11:13 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Sep 2016 21:46:01 +0000 (06:46 +0900)
commite492dbb41e025ac1a7d7934b1df52b2f0485f8dd
tree21f35aa012b3badd17d5651063e4ead052d0d23d
parent3697e5992f89c923aca17d7d9174739da28cb3cd
mmc: sd: optimize erase

To SD, there is no erase group, then the value erase_grp_size
will be default 1. When erasing SD blocks, the blocks will be
erased one by one, which is time consuming.

We use AU_SIZE as a group to speed up the erasing.

Erasing 4MB with a SD2.0 Card with AU_SIZE 4MB.
`time mmc erase 0x100000 0x2000`
time: 44.856 seconds (before optimization)
time: 0.335 seconds  (after optimization)

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Eric Nelson <eric@nelint.com>
Cc: Stephen Warren <swarren@nvidia.com>
drivers/mmc/mmc_write.c