From patchwork Tue Jul 17 11:33:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 142134 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3540277ljj; Tue, 17 Jul 2018 04:35:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcL5X08qYf8m86y9+z3zTm+qplGTWyO9KN5jfpLKRB6NSKrYnck5UVtHO6gKTfSnyU8rK4N X-Received: by 2002:a50:9943:: with SMTP id l3-v6mr2032367edb.272.1531827306706; Tue, 17 Jul 2018 04:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531827306; cv=none; d=google.com; s=arc-20160816; b=YptJvJSjYHwNXlx8v6HkfJ8DlBmfdTyzkVVE0ylXqQ0kCyCIxFt6xRydQkqYs6JYdu N4/5hQI/0R7YLwpxTRdqvOMIW0sgY+lwKVg11ixqlIFMOpyaWWZmAPMdIxmhyet+R/U3 Ru6ePuh+jbQkZACS1ZIw82N20zlONuXHHdL7bD6K4MdBglpR5HZ5cpmpNoDvL0LuWq9h 7dgYqGyx49pIiN4hQxGFj27SD73GcczZcAv87e0Fbd6zx7ZQxLP82dXq+3K24/8m4WSh mEUqxBpnIOkpuuVlfyuYoa8fzj6my2dW8P6tnOmDY5Qb82TKif/wVnhFCm9GCamWZN92 TXPQ== 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=ujzG+7wL71JsiJ7uTS17dXRsZBQvMljMVVKjPukGDfium/FSsnC0eH0c3Tu3dj5wkR AgYjXI5RXAHxH5DJE7e0SVT/jFpxsfhGvjC2BS3bpK7JhjNi2623E8uy4xACHOqdVPBg xKWsz1WHNziGkhR8kMthJntag5RAjD45/OpY8ZMRTSEQap2gEK5T9uvN7naNrup4EdzB FV1TlxvbK3RIHi/C1Fr6FWRQI+Z3jop6qRwhmjmdcJ/hFZ8SOFj1MPWngOmsGI8r0Oi6 f1RyvBYA5noeCiPvVhrFq6ObBQGazhqCne7JxLjO+eXz8XLvazyynpWzN/wd6Qtd3iOO gx4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NeD7gwO8; 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 a4-v6si639053edi.60.2018.07.17.04.35.06; Tue, 17 Jul 2018 04:35:06 -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=NeD7gwO8; 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 4081BC21E45; Tue, 17 Jul 2018 11:34:08 +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_H3, RCVD_IN_MSPIKE_WL, 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 18009C21E1A; Tue, 17 Jul 2018 11:33:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B2A6FC21DFF; Tue, 17 Jul 2018 11:33:35 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by lists.denx.de (Postfix) with ESMTPS id 6206BC21E3B for ; Tue, 17 Jul 2018 11:33:32 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id l16-v6so568675lfc.13 for ; Tue, 17 Jul 2018 04:33:32 -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=NeD7gwO8dbmXlnH7ayztNZxeOCnf29OdWFjc6E2mf0/fqqTr0fIX/HpzFcXjFs0EdH xf5GqIjjsBfp7RNB12LVqzrwHeHnASAqbFsTpFPtFkr5XlpKAYRqf38msJQs+aF8LzO2 ugPnVdvr3ty1/IeB+bR9i/eVxPnGWrwKlSELw= 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=bRRU3cEANNkrlM2ecX7oc/AJDmu3a+EH8hcfbTtzbXwymYGgNis/FVBdThz8D86rOw OEYVCGhvyGZNeXKdC6q0hw9daC1cyKuCxEhAH86LgFBJQyH/5REsU5f4rPSG9zbwFfYG TQCwucv5iXmsFuXOM/27sWusLIyHZ5IGmwH7rtXykxOZjkW1xVRSp7JIlaUDeP4TfYFq GMAPjK3WZhXzz4QtckLDxCthxlpJeKhL6Ys5hdqg83oH7hmZDb5XSD8ThQ4FKIX8LbxG c//ybdwv4qqjibRmJBSlhxLjnQzuEnedUfzovFegO6ryX20M33WqHm2FTAzuIjarya/S svLQ== X-Gm-Message-State: AOUpUlHMhGaWMWLVRP5BPpvJ9wcOtU2bU6UbhM2RRye6M0zxUSI2Tp0d hy/lcor1IPzkzqPu/1aSrxzZ84H5mVNgfQ== X-Received: by 2002:a19:1510:: with SMTP id l16-v6mr1000202lfi.88.1531827211581; Tue, 17 Jul 2018 04:33:31 -0700 (PDT) Received: from localhost (host-176-36-145-117.la.net.ua. [176.36.145.117]) by smtp.gmail.com with ESMTPSA id u24-v6sm141750lji.4.2018.07.17.04.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 04:33:31 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Tue, 17 Jul 2018 14:33:26 +0300 Message-Id: <1531827206-16158-3-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531827206-16158-1-git-send-email-igor.opaniuk@linaro.org> References: <1531827206-16158-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 v2 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 Tested-by: Eugeniu Rosca --- 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)