diff options
author | Mateusz Zalega <m.zalega@samsung.com> | 2014-04-29 18:15:30 (GMT) |
---|---|---|
committer | Pantelis Antoniou <panto@antoniou-consulting.com> | 2014-05-23 08:19:53 (GMT) |
commit | d803fea576c0b9caf2ece1ea1fac0550d3508a4d (patch) | |
tree | ca5edfba7378f5ebadaf452621fc4dfa7a3dcc29 /drivers/mmc | |
parent | 46c8ebc8cddb81e879d08030f030eca53b123ca9 (diff) | |
download | u-boot-d803fea576c0b9caf2ece1ea1fac0550d3508a4d.tar.xz |
mmc: postponed needless timer initialization
mmc_init() doesn't call get_timer() anymore if MMC is already
initialized.
<panto> Minor formatting fix.
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 16051e5..0c9ae5d 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1310,10 +1310,13 @@ static int mmc_complete_init(struct mmc *mmc) int mmc_init(struct mmc *mmc) { int err = IN_PROGRESS; - unsigned start = get_timer(0); + unsigned start; if (mmc->has_init) return 0; + + start = get_timer(0); + if (!mmc->init_in_progress) err = mmc_start_init(mmc); |