summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorMateusz Zalega <m.zalega@samsung.com>2014-04-28 21:13:26 +0200
committerLukasz Majewski <l.majewski@samsung.com>2014-05-05 08:21:47 +0200
commit41c2d60b3abad79f94a872d53ede016b1a891abc (patch)
tree3b1a8a3aed2cab1fc6c8793763a37c2278bf3e5c /board/samsung
parentb7d4259af298402b7d65c876d8e39e5b9e6c8934 (diff)
downloadu-boot-imx-41c2d60b3abad79f94a872d53ede016b1a891abc.zip
u-boot-imx-41c2d60b3abad79f94a872d53ede016b1a891abc.tar.gz
u-boot-imx-41c2d60b3abad79f94a872d53ede016b1a891abc.tar.bz2
ums: always initialize mmc before ums_disk_init()
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 <m.zalega@samsung.com> Tested-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/common/ums.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c
index dc155ad..cebabe9 100644
--- a/board/samsung/common/ums.c
+++ b/board/samsung/common/ums.c
@@ -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);
}