From patchwork Fri Jul 19 09:39:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1133973 X-Patchwork-Delegate: patrick.delaunay73@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="PVFsrEIO"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45qmFb1lwmz9s4Y for ; Fri, 19 Jul 2019 19:40:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F30D4C21EC9; Fri, 19 Jul 2019 09:40:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6BA6FC21E2C; Fri, 19 Jul 2019 09:39:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0F516C21DF3; Fri, 19 Jul 2019 09:39:46 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by lists.denx.de (Postfix) with ESMTPS id B39CDC21BE5 for ; Fri, 19 Jul 2019 09:39:46 +0000 (UTC) Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6J9acUH004472; Fri, 19 Jul 2019 11:39:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=8GZPtctAJXZIuP8EfIPx79oGqyqBOwVaa9RnD4XQRRY=; b=PVFsrEIOyRbcXHHGZIWAttGTUBzOD7H/ub6lseRxPPiX2+7Lpv5Z74iW0ZFk8yAXEbHf /CTjssBl5d3oCNNKwwqa2eqgguLjZvSwQMgPHAcnoiBg8yl7DVntKoZUiuIv4LeFf/gS A15O7HSksGi15MmTV39bVWsaN7lUuhvSzjzpBgMs3LT2cQMdKx+xqZjyQFtDF+wtFI2h IoC2eWhMFbN38baF373zU6fMNkfIzE1/Mm3izUg+wpJBxLGdKgv7MBrMdUQ6eGlSgT/o RyI5THAcLY1f3lfU/eULbaxbHet5SJFVLpih+SLRvTtuOYby7tND4HjEnbhkPlquU2lf TQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2tq4s27het-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 19 Jul 2019 11:39:46 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C89E83D; Fri, 19 Jul 2019 09:39:45 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B8E4C27E8; Fri, 19 Jul 2019 09:39:45 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jul 2019 11:39:45 +0200 Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jul 2019 11:39:45 +0200 From: Patrick Delaunay To: Date: Fri, 19 Jul 2019 11:39:30 +0200 Message-ID: <1563529171-16796-5-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563529171-16796-1-git-send-email-patrick.delaunay@st.com> References: <1563529171-16796-1-git-send-email-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-19_07:, , signatures=0 Cc: U-Boot STM32 Subject: [U-Boot] [PATCH 4/5] stm32mp1: update test on misc_read result X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Update the stm32mp1 baord after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") Signed-off-by: Patrick Delaunay --- board/st/stm32mp1/stm32mp1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 7769293..b1e592c 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -95,7 +95,7 @@ int checkboard(void) if (!ret) ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD), &otp, sizeof(otp)); - if (!ret && otp) { + if (ret > 0 && otp) { printf("Board: MB%04x Var%d Rev.%c-%02d\n", otp >> 16, (otp >> 12) & 0xF,