Skip to content
Commit 304fa0aa authored by Caleb Connolly's avatar Caleb Connolly Committed by Mattijs Korpershoek
Browse files

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: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: default avatarCaleb 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: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
parent 341a172e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment