From patchwork Fri Nov 22 23:13:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Olovyannikov X-Patchwork-Id: 1199720 X-Patchwork-Delegate: van.freenix@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="M0u33Ojc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47KXKq4cNDz9sPT for ; Sat, 23 Nov 2019 10:13:35 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 413B1C21E08; Fri, 22 Nov 2019 23:13:30 +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 F33EDC21C2C; Fri, 22 Nov 2019 23:13:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 208F3C21C2C; Fri, 22 Nov 2019 23:13:26 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by lists.denx.de (Postfix) with ESMTPS id C451AC21C29 for ; Fri, 22 Nov 2019 23:13:25 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id b11so9146463wmb.5 for ; Fri, 22 Nov 2019 15:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=2h4zWdbYpSG16FapyrPKMPwjAdkGgeRpL2wswCQw31c=; b=M0u33Ojc/ufyG8oGtbiOy21t9M4mOqwLpBTq3w2ZfQvE2LgQDC4UyLpV26qpeCO13W NNnQRDdNmYP5sbvqd2Gp2I4yu134R1mKgFqxRTglOQWAmaVIGjOGpR+zEJ2NPrlxjLUh edAOixT/XANunrSHkhlroWs2pg1RUADesGXSY= 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=2h4zWdbYpSG16FapyrPKMPwjAdkGgeRpL2wswCQw31c=; b=tRbNiqlHtlHRDYJoZCiMonbb+IQoOJHcNKrbWwSITH1V21KvA+dQGV7n/7UslxP5mW 3EThob/jofi66Fr2GSab237YzBlknTJvj4xAWI/18lEFOhBOxg+MZIAOdIwKnzupXTsS pk30B06r14soMsV7OBLkAOvTnTMXILwJp8px9NupPBbBB60jSyXfiWR7w+I4OJANLMZi 6yH2RZF9ky/N/Mp84sx2S6NheUEl2NFmsKIJbHneKY9u2DMgCzg8Qo2KUU2LPZsQocaE vYi3z/4d+JkLnNaawbeeooTfQ0rYH+7xeca7DgxCaqHqRl6Rx/XzUnHrcYj1kfcIvM2k zShg== X-Gm-Message-State: APjAAAXszsCCcg5jCSenl5Zz3bOBNWPIoL7ROAord6hoMtyhn87Hlijr Jeqv+Syh0UYKsezdq3ECEbNgzFKO1FdmHJejD05h2K1Hvm6xFo8hVFp4OlHZDr1+h/S21jU+/YO 6y5PCYMndpVwM9c3tMvavkgp/V2NCugRqubknfrOQBo/EjIJ2jciMASr4r07wDa5yLmnsxhtLn7 0qHFnvQNrCdMs= X-Google-Smtp-Source: APXvYqyA0zhaQpG+gTlPikn9anODMPEQ8ZI4BDjrCFQSmGunoFdT62PN2JFcT2xl60sep1QC/cioKg== X-Received: by 2002:a05:600c:2201:: with SMTP id z1mr13527306wml.68.1574464404952; Fri, 22 Nov 2019 15:13:24 -0800 (PST) Received: from LBRMN-LNXUB114.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id y6sm9507507wrn.21.2019.11.22.15.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 15:13:24 -0800 (PST) From: Vladimir Olovyannikov To: u-boot@lists.denx.de Date: Fri, 22 Nov 2019 15:13:09 -0800 Message-Id: <20191122231309.30586-1-vladimir.olovyannikov@broadcom.com> X-Mailer: git-send-email 2.17.1 Cc: Bharat Kumar Reddy Gooty Subject: [U-Boot] [PATCH 1/1] drivers: mmc: rpmb: Use R1 response 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" From: Bharat Kumar Reddy Gooty If the host has Broken R1B, use only R1 response type. Signed-off-by: Bharat Kumar Reddy Gooty Signed-off-by: Vladimir Olovyannikov --- drivers/mmc/rpmb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c index 33371fe562..ee6dbe30db 100644 --- a/drivers/mmc/rpmb.c +++ b/drivers/mmc/rpmb.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "mmc_private.h" @@ -91,6 +92,7 @@ static int mmc_rpmb_request(struct mmc *mmc, const struct s_rpmb *s, { struct mmc_cmd cmd = {0}; struct mmc_data data; + struct sdhci_host *host = mmc->priv; int ret; ret = mmc_set_blockcount(mmc, count, is_rel_write); @@ -105,6 +107,9 @@ static int mmc_rpmb_request(struct mmc *mmc, const struct s_rpmb *s, cmd.cmdarg = 0; cmd.resp_type = MMC_RSP_R1; + if (host->quirks & SDHCI_QUIRK_BROKEN_R1B) + cmd.resp_type = MMC_RSP_R1; + data.src = (const char *)s; data.blocks = 1; data.blocksize = MMC_MAX_BLOCK_LEN;