From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F480C38145 for ; Thu, 8 Sep 2022 11:22:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F6EE84AD2; Thu, 8 Sep 2022 13:22:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JNAihttH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E141684AED; Thu, 8 Sep 2022 13:22:34 +0200 (CEST) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1AA19847EF for ; Thu, 8 Sep 2022 13:22:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@gmail.com Received: by mail-pf1-x435.google.com with SMTP id e68so4549880pfe.1 for ; Thu, 08 Sep 2022 04:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=XSMql/q5gjhRg8bM5RFitMX53AbQJzHePUZ7HO5TyUI=; b=JNAihttHsEzCvqGxQKnS0la/cTlAbuIRGjNuwVSpPGHaf/k9WsXhudumZw3CheSYut nJ/T2sMH5zNo4t2HpA26ZSB+lS1D3GADFOMDDqAIBI5VHEQKzfGg9o3ALq01dFcwIk12 vw18RLGOhcHJg4UL69TiI+MCt+4mgUrBd2ar2P0FnpVt4upo/73sRsLVtFenY7O/cGCM gSG4/NGDVSdYs1tUEEWQHSvHXS+bFyfUWfQ6JvIwdgaK3TBGSVs5rzivtFd6mB0eN+VJ p7nELFr6E5yui0eUlvjeJ4rPvcyRPcR+sMLGkt5zArvqx7ws0j/xdRUBHJaVp7jztN5Z ioNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=XSMql/q5gjhRg8bM5RFitMX53AbQJzHePUZ7HO5TyUI=; b=4xnha8cfg2NxD20zBakVTNEaPkggjIyieAEPVXmjLm2puGpSOl9pM7lc8sIXoJ0hDP 5IiJBL6Fq4N7iYSDhcUJZJvqnNRM7mu+bhEhqMOSngj2XlMM+Y0u9gAxzx7S0yhDYRRs hTamXyyLr9+bwxCwzN7xlIEuV/mKangru/TaZiaCGCEHbvbAt3ElORftlSO+1IbaVLUb vm8drUU92nlye8hfnfexRbYuhmPrA6YTKEOtPR+X3gA2rzAY5uLPlYEyAsAiMDQWspyy +0NYAJ+TNPeYkA6Q4xrgj+A5FwRnSChBnnrRtrFgkC6WiuUuoaI0ciyv4vMYfZVRpbc8 pWjA== X-Gm-Message-State: ACgBeo3+nocC8TkT3XdAer7DbWyhsIw3yf+7ZPYosqA2Z/rfUyHjyp9n +xb4LMXAHOzm2NraK84FeIw= X-Google-Smtp-Source: AA6agR7Eu70ntYbask2kH/hpDxJ3BclKnactZc4FX6t3F5vN26LzXz5kOEd0lwiWnJqvnFC7P+rb2Q== X-Received: by 2002:a63:ee55:0:b0:429:88cf:78df with SMTP id n21-20020a63ee55000000b0042988cf78dfmr7321503pgk.301.1662636150352; Thu, 08 Sep 2022 04:22:30 -0700 (PDT) Received: from [192.168.0.19] ([183.99.112.216]) by smtp.gmail.com with ESMTPSA id x4-20020a170902a38400b0016dc26c7d30sm5375509pla.164.2022.09.08.04.22.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:22:29 -0700 (PDT) Message-ID: <573a07bf-30ab-4ece-02c6-dfc30379a99d@gmail.com> Date: Thu, 8 Sep 2022 20:22:27 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/2] mmc: sdhci: Add new quirks for SUPPORT_SINGLE Content-Language: en-US To: Kunihiko Hayashi , Peng Fan , Jaehoon Chung , Jassi Brar Cc: u-boot@lists.denx.de References: <20220906003913.8846-1-hayashi.kunihiko@socionext.com> <20220906003913.8846-2-hayashi.kunihiko@socionext.com> From: Jaehoon Chung In-Reply-To: <20220906003913.8846-2-hayashi.kunihiko@socionext.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi, On 9/6/22 09:39, Kunihiko Hayashi wrote: > This patch defines a quirk to disable the block count > for single block transactions. > > This is similar to Linux kernel commit d3fc5d71ac4d > ("mmc: sdhci: add a quirk for single block transactions"). > > Signed-off-by: Kunihiko Hayashi Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > drivers/mmc/sdhci.c | 8 +++++--- > include/sdhci.h | 1 + > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c > index bf989a594f7e..a80ad8329a38 100644 > --- a/drivers/mmc/sdhci.c > +++ b/drivers/mmc/sdhci.c > @@ -211,7 +211,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, > unsigned int stat = 0; > int ret = 0; > int trans_bytes = 0, is_aligned = 1; > - u32 mask, flags, mode; > + u32 mask, flags, mode = 0; > unsigned int time = 0; > int mmc_dev = mmc_get_blk_desc(mmc)->devnum; > ulong start = get_timer(0); > @@ -273,10 +273,12 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, > /* Set Transfer mode regarding to data flag */ > if (data) { > sdhci_writeb(host, 0xe, SDHCI_TIMEOUT_CONTROL); > - mode = SDHCI_TRNS_BLK_CNT_EN; > + > + if (!(host->quirks & SDHCI_QUIRK_SUPPORT_SINGLE)) > + mode = SDHCI_TRNS_BLK_CNT_EN; > trans_bytes = data->blocks * data->blocksize; > if (data->blocks > 1) > - mode |= SDHCI_TRNS_MULTI; > + mode |= SDHCI_TRNS_MULTI | SDHCI_TRNS_BLK_CNT_EN; > > if (data->flags == MMC_DATA_READ) > mode |= SDHCI_TRNS_READ; > diff --git a/include/sdhci.h b/include/sdhci.h > index 88f1917480b6..24b4599b857d 100644 > --- a/include/sdhci.h > +++ b/include/sdhci.h > @@ -247,6 +247,7 @@ > #define SDHCI_QUIRK_WAIT_SEND_CMD (1 << 6) > #define SDHCI_QUIRK_USE_WIDE8 (1 << 8) > #define SDHCI_QUIRK_NO_1_8_V (1 << 9) > +#define SDHCI_QUIRK_SUPPORT_SINGLE (1 << 10) > > /* to make gcc happy */ > struct sdhci_host;