From patchwork Wed Dec 28 08:12:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 709184 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 3tpQT22mZRz9t0w for ; Wed, 28 Dec 2016 19:12:37 +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="mv87OPNA"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE482B38E2; Wed, 28 Dec 2016 09:12:31 +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 9GwKNGkqGyvy; Wed, 28 Dec 2016 09:12:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D051B38C6; Wed, 28 Dec 2016 09:12:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58341B38C6 for ; Wed, 28 Dec 2016 09:12:27 +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 2eykvgdJDDSz for ; Wed, 28 Dec 2016 09:12:27 +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-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by theia.denx.de (Postfix) with ESMTPS id 142B4B3889 for ; Wed, 28 Dec 2016 09:12:23 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id l2so35334388wml.2 for ; Wed, 28 Dec 2016 00:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=kcqTr/fgw1zX25U0OPyHwZmRqVrip8tw8epSkgRJ/wE=; b=mv87OPNAk9xjuc83y8BZe+znL0FxWjvg1qLmemVo2tlrBD2x8OJyo5LM6HgLumOXqm ojorMFyE/7Bl0vKaBn6w1Q1WyYtUtiXhnGE8xHWRroVl75K0MfUGuiGwnwiHuUBgRV4i 9oD1L1CMh8xZHeH7Xt3h/RBICCcYnLGWi+L+axp6N81OjuzRhW/4HBYdraIJ2ywcjrLI /szaveHIZz7e0Z6drBV+pQiw0H3wFwU4IRmuz29tLCSmylLiGyPwkniI46zjOXybOL1y T4TAyOuccKyEtpMx5QqXpQQ3v47LwTsP0Rs1/Rqlmd8B3gCZ8K+t3sG3TWluas+sRMpa Frsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kcqTr/fgw1zX25U0OPyHwZmRqVrip8tw8epSkgRJ/wE=; b=DyUgM+EXMRApedghPCS4OCNyJYyB+VHVMlcfAbfkTfL6c15jH5FmWrjORu4jV6sOzQ vAh0yXCJBOGmYeOlWBLPcvnGdXN1pvfJglDNU8mbjK+htrYbS9zxtPPScE0zYWwtxDWs /TQAvQxkjJjT5F40NrEj0zfDuqyCx690/z80BLdGIG32BDyeghEEp+sZ3YkqhsMGJ6v4 Tbo/do9kS6gPAVNxcdPvtipYoiNXx6+shDr+47hTT0YhCDWfb9XssNKCHCNdS0fenzES AvgI6YL8g5lNjLiTnoJ/zrm5+OBq6LGobngppSVu9/ruQc8mmFrRr81YitoLyAOHsJN4 q2/Q== X-Gm-Message-State: AIkVDXKHBp2uXOfkeFGHnY/NBhgKyZ1wOcnusuC7iryxVdkMGOXTpBVNgxWSrw1DhNL25w== X-Received: by 10.28.153.10 with SMTP id b10mr32258497wme.103.1482912743519; Wed, 28 Dec 2016 00:12:23 -0800 (PST) Received: from odedg-x260.habana-labs.com ([31.154.53.250]) by smtp.gmail.com with ESMTPSA id j6sm63050986wjk.25.2016.12.28.00.12.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Dec 2016 00:12:23 -0800 (PST) From: Oded Gabbay To: u-boot@lists.denx.de Date: Wed, 28 Dec 2016 10:12:16 +0200 Message-Id: <1482912736-31304-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] spl: don't use %#l with CONFIG_USE_TINY_PRINTF 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" In the tiny-printf implementation, there is no support for %# and/or %l. This patch checks if CONFIG_USE_TINY_PRINTF is defined and if so, prints a different debug statement which doesn't use %#l Signed-off-by: Oded Gabbay Cc: Simon Glass Reviewed-by: Simon Glass --- common/spl/spl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index f7df834..23dfa2d 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -385,9 +385,14 @@ void board_init_r(gd_t *dummy1, ulong dummy2) debug("Unsupported OS image.. Jumping nevertheless..\n"); } #if defined(CONFIG_SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE) +#ifdef CONFIG_USE_TINY_PRINTF + debug("SPL malloc() used 0x%x bytes (%d KB)\n", + (uint) gd->malloc_ptr, (uint) gd->malloc_ptr / 1024); +#else debug("SPL malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); #endif +#endif debug("loaded - jumping to U-Boot..."); spl_board_prepare_for_boot();