aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorCaleb Connolly <caleb.connolly@linaro.org>2024-03-20 14:30:50 +0000
committerMattijs Korpershoek <mkorpershoek@baylibre.com>2024-03-22 10:16:13 +0100
commit304fa0aa445384e5e681a54abf413850591cec10 (patch)
tree5817de290bf955376c21b2eb081bbaa8e1142195 /cmd
parent341a172ef7867e3bfa90d6951997e5e2f168e188 (diff)
downloadu-boot-304fa0aa445384e5e681a54abf413850591cec10.zip
u-boot-304fa0aa445384e5e681a54abf413850591cec10.tar.gz
u-boot-304fa0aa445384e5e681a54abf413850591cec10.tar.bz2
usb: gadget: UMS: support multiple sector sizes
UFS storage often uses a 4096-byte sector size, add support for dynamic sector sizes based loosely on the Linux implementation. Support for dynamic sector sizes changes the types used in some divisions, resulting in the compiler attempting to use libgcc helpers (__aeabi_ldivmod). Replace these divisions with calls to lldiv() to handle this correctly. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-4-41be480172e1@linaro.org [mkorpershoek: squashed the lldiv() fix from caleb] Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/usb_mass_storage.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index a8ddeb4..751701f 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -88,10 +88,6 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
if (!strchr(devnum_part_str, ':'))
partnum = 0;
- /* f_mass_storage.c assumes SECTOR_SIZE sectors */
- if (block_dev->blksz != SECTOR_SIZE)
- goto cleanup;
-
ums_new = realloc(ums, (ums_count + 1) * sizeof(*ums));
if (!ums_new)
goto cleanup;