Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1772279lqm; Fri, 3 May 2024 06:19:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVr7LTlqrnoorDO0RrZKgLam1t6ARBsYBDK+b+hvB+2vHpgcGEB3PXo1qd7zGUjBo6EiOfRNhOouFmPPdwD7W9R0QMJUGOB00FYrE/OKw== X-Google-Smtp-Source: AGHT+IFFLeTtoirILa0A4ewVnQJxKWvjT96LSG9zswUAEQeWmodAYF4Jt6fCZZaKtoCxCDsz6VH9 X-Received: by 2002:a05:6214:c6b:b0:6a0:4d4f:9428 with SMTP id t11-20020a0562140c6b00b006a04d4f9428mr4334385qvj.32.1714742343440; Fri, 03 May 2024 06:19:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714742343; cv=pass; d=google.com; s=arc-20160816; b=DoCziDSNYkAkujqNHRHGqS+8HNl1PloI46EWDTds++52jtAn0eCjZ8FPjBB3UP/oyE SClLNU+3XtxecqKiMaQ7jyo+HGjKI00JQmmrdLv/+Dwn/v+5S7r8HX2Uv8cEINdo1LUF vXPC8PuHjh5aOqc3gZLrQJgryCctvyOyBDak3C7XOJrAMZVHm8uNbfWal41nVRSe+XYt hoh55gdWR90ew0t0RbZ6XIvGKH1sdeX6kuBXxVILQpPz+DZuEGv8t89MrVE2nCI4q6UG UqhOEJjOI05ayr9PYAi2IFiKyTYWbu8IRNFvpxOxhRYMAC+ZRdeJDO5kVU3Xl2MqnCXu GL1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=yRI9l6TRFX4cl/D/dHvxIPz5B9asZPit4lxB7Ww5SAs=; fh=/R5Ch//4VcB50DkzvYClQr/hZcP4W6QBpvmSGeJ/SIA=; b=V4WrqnoAM7jvspAUaU3rId0faLgQ2ONwRYoOin77uNSkgZJgOnXfijntNVTC0kuheX M6dDsA9h/sZcmQdhn7OVQt6ETGbwsvY/ZhBTp5mXtl1VG4JZiDxwc97ZODDRiMrPR5Oz seZuxnbx0wvev1o1AqpWFFgQXK4IfZr+G5s2vgiOxVBa2SLK1NQ+vL4lDC/1DuhPshrU PVbL2FbdZ9jgeLegZIkAN9iXbrq6WVM+m/zIu05BPKjTpDJFkzRH38ylDuouR/6ij7w6 4B4nzHEnynRl1ASjiTHNsF+zqKtO+AL5NXs+IQ4pQcO7sBxQeDBsFfFGTX/C8srxsN4T Z8uw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mbnuzj+F; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-167689-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fv9-20020a056214240900b006a05aedc976si3244798qvb.121.2024.05.03.06.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 06:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167689-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mbnuzj+F; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-167689-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2C9901C21D6E for ; Fri, 3 May 2024 13:19:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31E5E154421; Fri, 3 May 2024 13:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Mbnuzj+F" Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCAA1153826 for ; Fri, 3 May 2024 13:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714742128; cv=none; b=SoiQUl/djjMVfIcRPvmnMNVDT8SdRBp2ASnjHb71JkEzXBfWiKDY73Lz0hsh0cjjcE5gOakTRxsp8GgFXeBf+2+6tOgiP1+AsuKHPsUMAUdlmoUFch7Urd7wEsDf/VEaqZ944syYnL+qolKyceT9siYgy+tmpozPxWi+njosx1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714742128; c=relaxed/simple; bh=xrqzZwgdph5DRS4i3SCKXCa1JY0Gomt5Ypf74Pq1OsY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=W6hK8IsduxLYsMlnpH2ms8Kk/DUydHYs59UkXcG4LzBFCYLWMcdRQbglPD1+JGLzUiPxloE9v5qgerzbLggDOAzPz4vI/DtjK66ISw21s3Uf1FPLBeEEdseEWTyXHmHALJlo+v4Wa7W1yEoEcPtBMoNW7+DbCzF1OXUE4zscUX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Mbnuzj+F; arc=none smtp.client-ip=209.85.219.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-dcc6fc978ddso2650709276.0 for ; Fri, 03 May 2024 06:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714742126; x=1715346926; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yRI9l6TRFX4cl/D/dHvxIPz5B9asZPit4lxB7Ww5SAs=; b=Mbnuzj+F1O2ftcNQQa2gjKwnUIEzNWptcRetBceho0Y5Aa8AJhE/TqlCMOjfFt/M06 LZ4McigjWo0z4CA2xJGkMjOGRNpBJ2+h53A2VJAJpsKsqyC6Ktn0LzTOYk/SXmEsBmgs v0XPoc+nMYnPxKy1KT77c5XS9JwIITbHaby7NRXwSdubet8A+jjQ8tiEb8BNkSwTVgpd +CiquOg/lyTUnwkHHDdwj8lqAJCZ8DL/exZO3hqVIN1Zc6yablOs35WHNXnU1ZJmTyo1 xQ4iVz4vjrfdD3HXBMZTrdF2Tc3RHFv93D3EkvxgxMW2EPHkzYVy+tKgfgSmHMbk7pCe vHqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714742126; x=1715346926; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yRI9l6TRFX4cl/D/dHvxIPz5B9asZPit4lxB7Ww5SAs=; b=m8fW6lWg23iOFMQS/yAB3cst1BpjRkQ71+uKnkpx7I0BOZwzOhBkXA3odVRQ+LE/IE n/rQmH7x89sZM/J9JtVZD0U4BeHX3OI6Hngde2sDi1u3BL8jTCfNMJUbMA4kRSR3uqGK HqV40GMvwoKt9fHAuiPQhACtNvKqADstGpF2TxFOAE7Y2AjPi/Ie++7THPgJd4pvcip4 kdKH1yPJeu30PRZonraH4xT8kpIF+DjBItqfKekVi7tFDs+FH26Hkrc/irpLS1+JVwHC /gcHwBEz5JRytfevrEdnN6bpQbF954wcTh9dM/2CDVbVb2JJE7GqtvUwyFteqFl2V03s O6bw== X-Forwarded-Encrypted: i=1; AJvYcCXBNShrFB+V6b4sedfAzKTuk58rxxfZBfu78+REvbjrxZymsaSne9kdK52/1xVx1zsFhu09lAnBQaxU0ZNwH1EwOU/2N6uGq7luF8RX X-Gm-Message-State: AOJu0YwkLdyAc9kKMxw4T1OGItoK3oSpfLzLhkyhcQsY/PqOkfiXbxG2 VmhK0kQhnH3cHdfCW7ms/1crAA0oTrJm0OxbGPEFwFHXBvUmbLNrB9Ms18XkMepLDejwSl88s9W PNgvRptsnkKkRSv6xmp8OoD3EPnBcgdZ5WkzsOg== X-Received: by 2002:a25:aacb:0:b0:de8:a500:ffdb with SMTP id t69-20020a25aacb000000b00de8a500ffdbmr1856096ybi.26.1714742125931; Fri, 03 May 2024 06:15:25 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240430093724.2692232-1-claudiu.beznea.uj@bp.renesas.com> In-Reply-To: <20240430093724.2692232-1-claudiu.beznea.uj@bp.renesas.com> From: Ulf Hansson Date: Fri, 3 May 2024 15:14:50 +0200 Message-ID: Subject: Re: [PATCH v3] mmc: renesas_sdhi: Set the SDBUF after reset To: Claudiu Cc: wsa+renesas@sang-engineering.com, linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea , Hien Huynh Content-Type: text/plain; charset="UTF-8" On Tue, 30 Apr 2024 at 11:37, Claudiu wrote: > > From: Claudiu Beznea > > For development purpose, renesas_sdhi_probe() could be called w/ > dma_ops = NULL to force the usage of PIO mode. In this case the > renesas_sdhi_enable_dma() will not be called before transferring data. > > If renesas_sdhi_enable_dma() is not called, renesas_sdhi_clk_enable() > call from renesas_sdhi_probe() will configure SDBUF by calling the > renesas_sdhi_sdbuf_width() function, but then SDBUF will be reset in > tmio_mmc_host_probe() when calling tmio_mmc_reset() though host->reset(). > If SDBUF is zero the data transfer will not work in PIO mode for RZ/G3S. > > To fix this call again the renesas_sdhi_sdbuf_width(host, 16) in > renesas_sdhi_reset(). The call of renesas_sdhi_sdbuf_width() was not > removed from renesas_sdhi_clk_enable() as the host->reset() is optional. > > Co-developed-by: Hien Huynh > Signed-off-by: Hien Huynh > Signed-off-by: Claudiu Beznea Applied for next, thanks! Kind regards Uffe > --- > > Changes in v3: > - shortened the comment introduced in renesas_sdhi_reset() > > Changes in v2: > - fixed typos in commit description > - limit the comment lines to 80 chars > > drivers/mmc/host/renesas_sdhi_core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c > index f84f60139bcf..d9503f9f6e96 100644 > --- a/drivers/mmc/host/renesas_sdhi_core.c > +++ b/drivers/mmc/host/renesas_sdhi_core.c > @@ -589,6 +589,9 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host, bool preserve) > sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); > priv->needs_adjust_hs400 = false; > renesas_sdhi_set_clock(host, host->clk_cache); > + > + /* Ensure default value for this driver. */ > + renesas_sdhi_sdbuf_width(host, 16); > } else if (priv->scc_ctl) { > renesas_sdhi_scc_reset(host, priv); > } > -- > 2.39.2 >