From patchwork Wed Oct 28 04:24:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siarhei Siamashka X-Patchwork-Id: 537185 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2F36D140D7C for ; Wed, 28 Oct 2015 15:24:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=LYuBkgsP; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 137204B62B; Wed, 28 Oct 2015 05:24:39 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PuDW8GO1vn4o; Wed, 28 Oct 2015 05:24:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E7574B615; Wed, 28 Oct 2015 05:24:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F1494B615 for ; Wed, 28 Oct 2015 05:24:35 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RXTGfJR9sNw8 for ; Wed, 28 Oct 2015 05:24:35 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by theia.denx.de (Postfix) with ESMTPS id 1A9B04A03A for ; Wed, 28 Oct 2015 05:24:31 +0100 (CET) Received: by lbjm5 with SMTP id m5so120865lbj.3 for ; Tue, 27 Oct 2015 21:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=zl8S6jU5FmLRofZqcaavMqHYli9b+eYixpHSysGFWvg=; b=LYuBkgsPPVmR16UAOodtr6Ejy2c/Sv/Qateu3gTVji7N6b1mAkPxEVgRO9+Nudzu9H Xa9RqvBalMSAzQRwEDUHN1sRUOIIVG3TxPpfmPB+8pkGZFWULjb0pugbHgdawrvmMU8X GAJmrbBxPLlfQF/b07HVr/oxXNmwvFrzkx+/WKdrZ9meavbenV7mFJOdI0N9duyJ60+Q nrLYQvhuXjyilpRP9vf15EPuvPvn9W5aDKuADhUq2cocr35nH0o+zqLrH6VOjdDdVI4A CAQ134ca4w3WPKxfgK4Dck4E8AymSoLHwIhfvWQbHs8Hb71x/HO8hrFrMuwaQG7KN2/k UoSQ== X-Received: by 10.112.189.193 with SMTP id gk1mr12512210lbc.98.1446006271014; Tue, 27 Oct 2015 21:24:31 -0700 (PDT) Received: from localhost.localdomain (85-76-140-49-nat.elisa-mobile.fi. [85.76.140.49]) by smtp.gmail.com with ESMTPSA id a65sm7668982lfb.14.2015.10.27.21.24.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 21:24:29 -0700 (PDT) From: Siarhei Siamashka To: u-boot@lists.denx.de Date: Wed, 28 Oct 2015 06:24:16 +0200 Message-Id: <1446006256-19153-1-git-send-email-siarhei.siamashka@gmail.com> X-Mailer: git-send-email 2.4.10 Cc: Steve Rae , Tom Rini Subject: [U-Boot] [PATCH] mmc: Use lldiv() for 64-bit division in write_raw_image() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Tom Rini --- I have only tested that the compilation problem disappears for me. It would be best if somebody could confirm whether the fix is correct. common/fb_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/fb_mmc.c b/common/fb_mmc.c index 0c48cf9..f424bb8 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -11,6 +11,7 @@ #include #include #include +#include #ifndef CONFIG_FASTBOOT_GPT_NAME #define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME @@ -64,7 +65,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);