summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-05-05 10:40:13 -0600
committerLukasz Majewski <l.majewski@samsung.com>2014-05-08 10:38:29 +0200
commitdc1e746c42d440fcd70aaaf02a1bbce5a4b2a5e6 (patch)
tree2a6ae6574f4be8695e3ba25a39784d3c8ec8b729 /board/samsung
parentc2474d9c718dea4f26067e85d356644a3aed26c2 (diff)
downloadu-boot-imx-dc1e746c42d440fcd70aaaf02a1bbce5a4b2a5e6.zip
u-boot-imx-dc1e746c42d440fcd70aaaf02a1bbce5a4b2a5e6.tar.gz
u-boot-imx-dc1e746c42d440fcd70aaaf02a1bbce5a4b2a5e6.tar.bz2
ums: remove error-checking of MMC device size
There's no reason to believe that an MMC device will incorrectly report its capacity. Remove error checking of this value from ums_disk_init() to simplify it. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/common/ums.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c
index 1f7dda4..42a4901 100644
--- a/board/samsung/common/ums.c
+++ b/board/samsung/common/ums.c
@@ -38,16 +38,9 @@ static struct ums ums_dev = {
static struct ums *ums_disk_init(struct mmc *mmc)
{
- uint64_t mmc_end_sector = mmc->capacity / SECTOR_SIZE;
-
- if (!mmc_end_sector) {
- error("MMC capacity is not valid");
- return NULL;
- }
-
ums_dev.block_dev = &mmc->block_dev;
ums_dev.start_sector = 0;
- ums_dev.num_sectors = mmc_end_sector;
+ ums_dev.num_sectors = mmc->capacity / SECTOR_SIZE;
printf("UMS: disk start sector: %#x, count: %#x\n",
ums_dev.start_sector, ums_dev.num_sectors);