diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-05-05 10:40:11 -0600 |
---|---|---|
committer | Lukasz Majewski <l.majewski@samsung.com> | 2014-05-08 10:38:29 +0200 |
commit | ce19d974018273c8f69d98b7139e7fef822cc02a (patch) | |
tree | ba4a4364da023b2105853126bdc3718e138b7cb1 /board | |
parent | 66b88b07cdab041ac0cf6a9bf5b131aedc248089 (diff) | |
download | u-boot-imx-ce19d974018273c8f69d98b7139e7fef822cc02a.zip u-boot-imx-ce19d974018273c8f69d98b7139e7fef822cc02a.tar.gz u-boot-imx-ce19d974018273c8f69d98b7139e7fef822cc02a.tar.bz2 |
ums: support block devices not MMC devices
The USB Mass Storage function could equally well support a SATA device
as support an MMC device. Update struct ums to contain a block device
descriptor, not an MMC device descriptor.
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')
-rw-r--r-- | board/samsung/common/ums.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c index cebabe9..ffe6368 100644 --- a/board/samsung/common/ums.c +++ b/board/samsung/common/ums.c @@ -7,12 +7,13 @@ #include <common.h> #include <usb_mass_storage.h> +#include <mmc.h> #include <part.h> static int ums_read_sector(struct ums *ums_dev, ulong start, lbaint_t blkcnt, void *buf) { - block_dev_desc_t *block_dev = &ums_dev->mmc->block_dev; + block_dev_desc_t *block_dev = ums_dev->block_dev; lbaint_t blkstart = start + ums_dev->start_sector; int dev_num = block_dev->dev; @@ -22,7 +23,7 @@ static int ums_read_sector(struct ums *ums_dev, static int ums_write_sector(struct ums *ums_dev, ulong start, lbaint_t blkcnt, const void *buf) { - block_dev_desc_t *block_dev = &ums_dev->mmc->block_dev; + block_dev_desc_t *block_dev = ums_dev->block_dev; lbaint_t blkstart = start + ums_dev->start_sector; int dev_num = block_dev->dev; @@ -45,7 +46,7 @@ static struct ums *ums_disk_init(struct mmc *mmc) return NULL; } - ums_dev.mmc = mmc; + ums_dev.block_dev = &mmc->block_dev; if (ums_end_sector <= mmc_end_sector) { ums_dev.start_sector = UMS_START_SECTOR; |