]> Git Repo - u-boot.git/commitdiff
ums: always initialize mmc before ums_disk_init()
authorMateusz Zalega <[email protected]>
Mon, 28 Apr 2014 19:13:26 +0000 (21:13 +0200)
committerLukasz Majewski <[email protected]>
Mon, 5 May 2014 06:21:47 +0000 (08:21 +0200)
In cases when MMC hadn't been initialized before, ie. by the user or other
subsystem, it was still uninitialized while UMS media capacity check,
leading to broken ums command.

UMS has to initialize resources it uses.

Tested on Samsung Goni.

Signed-off-by: Mateusz Zalega <[email protected]>
Tested-by: Mateusz Zalega <[email protected]>
Acked-by: Lukasz Majewski <[email protected]>
Cc: Minkyu Kang <[email protected]>
board/samsung/common/ums.c

index dc155ad0e5b3bdb70133369dba8290a9e311f5c2..cebabe920a29de022c99e5a1429e11929ce8ee74 100644 (file)
@@ -66,11 +66,9 @@ static struct ums *ums_disk_init(struct mmc *mmc)
 
 struct ums *ums_init(unsigned int dev_num)
 {
-       struct mmc *mmc = NULL;
+       struct mmc *mmc = find_mmc_device(dev_num);
 
-       mmc = find_mmc_device(dev_num);
-       if (!mmc)
+       if (!mmc || mmc_init(mmc))
                return NULL;
-
        return ums_disk_init(mmc);
 }
This page took 0.035388 seconds and 4 git commands to generate.