Skip to content
Commit 5ff8e548 authored by Philipp Tomsich's avatar Philipp Tomsich Committed by Jagan Teki
Browse files

sunxi: improve throughput in the sunxi_mmc driver



Throughput tests have shown the sunxi_mmc driver to take over 10s to
read 10MB from a fast eMMC device due to excessive delays in polling
loops.

This commit restructures the main polling loops to use get_timer(...)
to determine whether a (millisecond) timeout has expired.  We choose
not to use the wait_bit function, as we don't need interruptability
with ctrl-c and have at least one case where two bits (one for an
error condition and another one for completion) need to be read and
using wait_bit would have not added to the clarity.

The observed speedup in testing on a A31 is greater than 10x (e.g. a
10MB write decreases from 9.302s to 0.884s).

Signed-off-by: Philipp Tomsich's avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Maxime Ripard's avatarMaxime Ripard <maxime.ripard@bootlin.com>
Tested-by: default avatarMylène Josserand <mylene.josserand@bootlin.com>
Acked-by: default avatarJagan Teki <jagan@openedev.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 4744d81c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment