aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>2015-10-28 06:24:16 +0200
committerTom Rini <trini@konsulko.com>2015-11-12 15:58:59 -0500
commit5e0efc1bc6e358efcf6cd234192a0eead21d760f (patch)
tree8582d212513685cd79f2be19a3350b7fddf97f44 /common
parentbcb41dcaefacdd4cf0f679b34224cb3d997ee8b4 (diff)
downloadu-boot-5e0efc1bc6e358efcf6cd234192a0eead21d760f.zip
u-boot-5e0efc1bc6e358efcf6cd234192a0eead21d760f.tar.gz
u-boot-5e0efc1bc6e358efcf6cd234192a0eead21d760f.tar.bz2
mmc: Use lldiv() for 64-bit division in write_raw_image()
This fixes compilation problems when using a hardfloat toolchain on ARM, which manifest themselves as "libgcc.a(_udivmoddi4.o) uses VFP register arguments, u-boot does not". These problems have been reported in the U-Boot mailing list: http://lists.denx.de/pipermail/u-boot/2015-October/230314.html http://lists.denx.de/pipermail/u-boot/2015-October/231908.html Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r--common/fb_mmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index e4fbd8d..b480e76 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -13,6 +13,7 @@
#include <part.h>
#include <sparse_format.h>
#include <mmc.h>
+#include <div64.h>
#ifndef CONFIG_FASTBOOT_GPT_NAME
#define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME
@@ -73,7 +74,7 @@ static void write_raw_image(block_dev_desc_t *dev_desc, disk_partition_t *info,
/* determine number of blocks to write */
blkcnt = ((download_bytes + (info->blksz - 1)) & ~(info->blksz - 1));
- blkcnt = blkcnt / info->blksz;
+ blkcnt = lldiv(blkcnt, info->blksz);
if (blkcnt > info->size) {
error("too large for partition: '%s'\n", part_name);