summaryrefslogtreecommitdiff
path: root/drivers/mmc/rpmb.c
diff options
context:
space:
mode:
authorBharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>2019-11-22 15:13:09 -0800
committerPeng Fan <peng.fan@nxp.com>2020-02-17 14:55:04 +0800
commitae93d8106bdb5926efef9222d553adb295ebce96 (patch)
treee19c4a4136c020c963a076ee6c7b4cb57f9369b2 /drivers/mmc/rpmb.c
parentf2a73d6867ef973fbb8471cc87058205999b5e5c (diff)
downloadu-boot-ae93d8106bdb5926efef9222d553adb295ebce96.tar.gz
u-boot-ae93d8106bdb5926efef9222d553adb295ebce96.tar.bz2
u-boot-ae93d8106bdb5926efef9222d553adb295ebce96.zip
drivers: mmc: rpmb: Use R1 response
If the host has Broken R1B, use only R1 response type. Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com> Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Diffstat (limited to 'drivers/mmc/rpmb.c')
-rw-r--r--drivers/mmc/rpmb.c5
1 files changed, 5 insertions, 0 deletions
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 <common.h>
#include <memalign.h>
#include <mmc.h>
+#include <sdhci.h>
#include <u-boot/sha256.h>
#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;