From patchwork Fri Jul 13 16:03:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 141913 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp978087ljj; Fri, 13 Jul 2018 09:04:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcZnd7kVFaEvIQjSV/sJD36kgZdAOCqQ1GA2SlPhlqqK6MGM+fjCaH3Zdh4GNQR964GLv5u X-Received: by 2002:a50:a624:: with SMTP id d33-v6mr7512948edc.8.1531497873413; Fri, 13 Jul 2018 09:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531497873; cv=none; d=google.com; s=arc-20160816; b=hUtwmMtZIH0au2Aw7GdZ77ezeoFMbpZMy/v31bY/nyFTNMmJ7wIjmgYJi1CxFnOa6P I3Xv4UpS1fe7gnVCHTsst8xUm/+y84BVAe0KhKTBDebzGX5+XVaaG1vXnFsM7BCSWppi oVwRBtF70fdtlElaCRQx2asVBaCtqU3zqcP33oFY+qGqMT7Jr9B1b4IDRRJISWBGXxMJ +FpsE/j9TBXEQFdklDdc8txYRsdj6agRP8n+uDRhT9bBpVJoDuwUxKf36mz6lzrOiTwR c2UXR0CNTONd1/1nn6+ecwyAynfOCKPPTEKkIVtpK6r1O0jAJcPUW+hkE/kBxOfDaueo ZrIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=lvWkGWkuUy9PcVk+7KRPqNLjTuAdkWWpZEa9PeoNoxs=; b=TsWV3i6374nf+DL52Ha3xdbjatmVlGPtg4f/NFlqlK5Nl3X0Aj0V5nCirREzLBajWk OU/e3e2HHV9UdWZ5tiPK38MEnn0X84EESRF+YU+umXEzIYPv3gPgzIzju92bQO447Mmu bm7jPz60SMe8Dm6C8HVEKLuA30nX2bmIA4KPyKlO1U8IOkflyoHkaCjIEiaiXqXQp9RJ SPxBhsD8R+EjS8wB6bkFRrYstiXDClSwhF1MrJACwV4CkWY4DWtR7Zv0yxAjf1J29QwG TOZgZ5qlSd2xNKd+TPZ3WnROn4UlGHvYMkmUDnNljf/4iQNYDaIonkEHWQ9FzMl9fzdI Kg4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fjcx1/Su"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id p21-v6si4424820edm.136.2018.07.13.09.04.33; Fri, 13 Jul 2018 09:04:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fjcx1/Su"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id E47DBC22091; Fri, 13 Jul 2018 16:03:50 +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=RCVD_IN_MSPIKE_H2, 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 14022C2205F; Fri, 13 Jul 2018 16:03:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9AC49C21F7E; Fri, 13 Jul 2018 16:03:38 +0000 (UTC) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by lists.denx.de (Postfix) with ESMTPS id D6B50C22074 for ; Fri, 13 Jul 2018 16:03:34 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id p6-v6so24917121ljc.5 for ; Fri, 13 Jul 2018 09:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NgHwrTVUDm8haJH5Ty6p7PRhgkF/U3+JmB+mxVVxS54=; b=fjcx1/SuvcSJXKg/zskk3hGxtoSiTabLJiwwPtUytHbYN/KYS73bfKKIodkd7FpQ0m bMu28gVKTosyIprCHtOSXr3cypEpqFM/rVdpC5abEjP+Gy1Pyy/PxjBszx3fUgV/THI+ xlDBQpqtYBUE5fPoDqNbeAC3eeVobVDTt4gpQ= 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:in-reply-to :references; bh=NgHwrTVUDm8haJH5Ty6p7PRhgkF/U3+JmB+mxVVxS54=; b=MIo8eWOYVaxs5LC+8bMTRGkJcnzaLNTSBZZGaN3brYK4r4dunhTsWU6/F3GF0pBsF/ bC3EtNcGQOtr276x1DPLK9XuHVhyKknVMKjxm7xb8diu0kkY9ZRWYaCtgjDpx5zpsC+7 0zL1Go+HjIudww924PHi/Ny1IJ9ZuJxXELT9f2XnLtVA/U5FJv1cw5a/ASOgNG4X6+53 Eg1cU0Wil42GJ0jurcWlZHMHUgwDWec8RzUHW/mUHu2bJXT+wrz/MqfWfdqV/q9qWFB6 FozMO/7fgi93paceny+btrBhUt/xdCCAcqomwFws68K1x7LDHxijxJaiw1UT2pPV7TzT Yr8Q== X-Gm-Message-State: AOUpUlHB6DL+pxVWHOV2fF6VN4PJfzaJokaYxcElSKOEa7KLKGa55fdi AUAnOAxqVVVf03cUMntBrlQQtXBBVbqjPQ== X-Received: by 2002:a2e:5243:: with SMTP id g64-v6mr3673812ljb.144.1531497814051; Fri, 13 Jul 2018 09:03:34 -0700 (PDT) Received: from localhost ([46.211.143.111]) by smtp.gmail.com with ESMTPSA id i15-v6sm4395021lfb.94.2018.07.13.09.03.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 09:03:33 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Fri, 13 Jul 2018 19:03:27 +0300 Message-Id: <1531497807-4292-3-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531497807-4292-1-git-send-email-igor.opaniuk@linaro.org> References: <1531497807-4292-1-git-send-email-igor.opaniuk@linaro.org> Cc: trini@konsulko.com, praneeth@ti.com, misael.lopez@ti.com, erosca@de.adit-jv.com, joakim.bech@linaro.org Subject: [U-Boot] [PATCH 2/2] avb2.0: use block API in AVB ops 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Use blk_dread()/blk_dwrite() in mmc_read()/mmc_write() AVB operation implementations. This fixes compilation issues when CONFIG_BLK is enabled. Signed-off-by: Igor Opaniuk --- common/avb_verify.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index f9a00f8..20e35ad 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -288,8 +289,8 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part, tmp_buf = buffer; } - blks = part->mmc->block_dev.block_read(part->mmc_blk, - start, sectors, tmp_buf); + blks = blk_dread(part->mmc_blk, + start, sectors, tmp_buf); /* flush cache after read */ flush_cache((ulong)tmp_buf, sectors * part->info.blksz); @@ -327,8 +328,8 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start, tmp_buf = buffer; } - return part->mmc->block_dev.block_write(part->mmc_blk, - start, sectors, tmp_buf); + return blk_dwrite(part->mmc_blk, + start, sectors, tmp_buf); } static struct mmc_part *get_partition(AvbOps *ops, const char *partition)