summaryrefslogtreecommitdiffstats
path: root/board/samsung/common/ums.c
Commit message (Collapse)AuthorAgeFilesLines
* ums: move IO support code to common locationStephen Warren2014-05-081-55/+0
| | | | | | | | | | There's nothing Samsung-/board-specfic about the implementation of ums_init(). Move the code into cmd_usb_mass_storage.c, so that it can be shared by any user of that command. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* ums: remove ums_disk_init()Stephen Warren2014-05-081-10/+7
| | | | | | | | | Now that ums_disk_init() is so simple, there's no need for it to be a separate function. Instead, just add it to the tail end of ums_init(). Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* ums: remove error-checking of MMC device sizeStephen Warren2014-05-081-8/+1
| | | | | | | | | | 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>
* ums: remove UMS_{NUM,START}_SECTORS + UMS_START_SECTORStephen Warren2014-05-081-12/+2
| | | | | | | | | | | These values aren't set anywhere at present, and hence have no effect. The concept of a single global offset/number of sectors to expose through USB Mass Storage doesn't even make sense in the face of multiple storage devices. Remove these defines to simplify the code. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* ums: support block devices not MMC devicesStephen Warren2014-05-081-3/+4
| | | | | | | | | | 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>
* ums: always initialize mmc before ums_disk_init()Mateusz Zalega2014-05-051-4/+2
| | | | | | | | | | | | | | | 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>
* usb: ums: move ums code from trats to Samsung common directoryPrzemyslaw Marczak2013-11-081-0/+76
UMS init was implemented in trats board file but mostly it comprises common code. Due to that it has been moved to common/ums.c to avoid code duplication in the future. Changes: - move ums initialization code from trats to common/ums.c - remove unused CONFIG_USB_GADGET_MASS_STORAGE from trats.h Changes v2: - move this patch at the top of code cleanups patches Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Minkyu Kang <mk7.kang@samsung.com>
OpenPOWER on IntegriCloud