From patchwork Fri Dec 16 09:45:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 706372 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 3tg55T36VNz9t2b for ; Fri, 16 Dec 2016 20:45:17 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="lhJBcZ9S"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D4DA6A75C9; Fri, 16 Dec 2016 10:45:14 +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 oXVaq8KaHmCE; Fri, 16 Dec 2016 10:45:14 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34CB8A75B7; Fri, 16 Dec 2016 10:45:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AEEC3A75B7 for ; Fri, 16 Dec 2016 10:45:09 +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 G7B2VCXmELtG for ; Fri, 16 Dec 2016 10:45:09 +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-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by theia.denx.de (Postfix) with ESMTPS id 5FAEBA75B4 for ; Fri, 16 Dec 2016 10:45:06 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id g23so4210606wme.1 for ; Fri, 16 Dec 2016 01:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=UMkV2kjmPbbdNY08w+gZ77uyx7+cIG1nyXn+gbkk034=; b=lhJBcZ9Su/jBrGzbTU4v/K7s+kX9LVKz6th5HABdc9FKXs96RxLooWW3T++A83PuOd 0bi+GBUbz5FhpWZugtGGUpEwzTMMXU4mmpQ1cCQ25arHZzjSyeDB3PiFW7uSHJyOgmVP tRIDyDkWFBRpE/7yrHRrIkYHLCQzPyHwNele4dJbvbldntMLW2b4VJ0uSh0cRCrxMSdK /g8Nr0ODPb4BAI+s25zoyTQ1PiQLvZonbAejhwkjl2IjsQTfPVvS6tBWFKHTs62bpso+ YnRA6lBZccWY77D3DWTT1iMpwZ9+Qbw/nnJUMGQOOKF7M6AHpybAVss82jChntg6iYb0 KP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=UMkV2kjmPbbdNY08w+gZ77uyx7+cIG1nyXn+gbkk034=; b=oqoXz0PV0uL7OrVi6/hRq6QakkaH9xRcwn4QF2z48V8jYfB+WL7dAJf1xQttjqhD/j BaUdbMTkCCjnANT529JHgA0MK8sruvxE4PVcVbBt4/AvsCxxz4Hw2ZS2GTj2DvcacA2n 9luul3Bry7n3L1hvFYILBxdnONeqc6NW/Avezzo1a0FXfM2BV68NGzGZ4cH7H4XdC9aV AysLfxJ4LqU/WviI+MEn8Bh/hY7O6sreZvDdOaIQ52TkcL63qmVVCBFhiIHERcNnPEbs fgc6kxH6qlyDF12H1XtIdXcdboWealuMe5hDt050kFfPS9tvJRxBdKiCAt9BHxowdF+U hGWw== X-Gm-Message-State: AIkVDXK5Y4FslksNYAgKDxAZnnrWISYTmViHCvho+uv/QJTifpOBCD9qiPKv16ty/c/fwQ== X-Received: by 10.28.92.21 with SMTP id q21mr1965115wmb.71.1481881505924; Fri, 16 Dec 2016 01:45:05 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id cl6sm5997480wjc.10.2016.12.16.01.45.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 16 Dec 2016 01:45:05 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Fri, 16 Dec 2016 10:45:03 +0100 Message-Id: <1e029d3a67722c20d8b6194d3388efe5ca92f5bf.1481881501.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] common: Fix logic in fpga programming 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" Stop boot process if fpga programming fails. Signed-off-by: Michal Simek --- common/image.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/image.c b/common/image.c index bd07e86701a4..e3486e46a459 100644 --- a/common/image.c +++ b/common/image.c @@ -1375,11 +1375,10 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images, img_len, BIT_PARTIAL); } - printf(" Programming %s bitstream... ", name); if (err) - printf("failed\n"); - else - printf("OK\n"); + return 1; + + printf(" Programming %s bitstream... OK", name); break; default: printf("The given image format is not supported (corrupt?)\n");