Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1889364lqa; Tue, 30 Apr 2024 02:10:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjK1BaGvHmQJnw3g1mpZtY1O/Bl73oYUVeQc2fTdw5VrPV8igX90Sydw1Tiz2Nxw+AQmvrOnRC8QQg6Q21tGFb9zHpbaigH1RlJyIoaQ== X-Google-Smtp-Source: AGHT+IF/aufs9yf6Sl/jKkMbSdbicijvxIR1CdXXuCOHdyoQk6d0uFwTudIiVFtyd7SMZ6B/xztU X-Received: by 2002:a50:cdd2:0:b0:570:1ea8:c50a with SMTP id h18-20020a50cdd2000000b005701ea8c50amr9094243edj.6.1714468248404; Tue, 30 Apr 2024 02:10:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714468248; cv=pass; d=google.com; s=arc-20160816; b=pd0nDDiWSgMYtvodAPmuKAadzrxThfauarwxrbBpp+LHxBJjcnRGaT0uozW21tOW3A xoQRPG0QoO55Q5mXSjrHngEtnvORfa4fnC1HhdihiIeOxlfeFNU1ZictM36hAuzC67BH q6VGM4sXz2/ZMiyfvVt88QNN/d1YCwfT4/9Aj7MslZfuTciJ988u1IK7waupnFoIDWye Ma6OBSBZ9g1VMDbl2j8XhmI1GKlSjdxvHo2VPVRvqDwZHp2hVOoR93+bAu0lc5aNvRkk 5vjM0Pgff+wl+Zz6MPdIs6wdR7UjIRramBjk+Pd400p6n2OkCIq77G44Swv2Tme3Iys2 n/rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=QJb4ulNH2VMgB23s2bKMJ77ejPMzfrg0P2qy+6olDX4=; fh=y7AQmQJtCwriieoOxIpSJdCrF6+hTmA1pauiR1ZnTXQ=; b=gBEgBEZw4gO/XQxn/28e9L1dhTWebe0fIzOwMZvPhT8B4KIAx5qixaX3Ngp7zYYMuB 5NnCVRDt6egli75VJVyikZcEKSg2/Kf0t3QM+CCmMUn22eSbf0p+UhgsQQ+QqUj+0Fuy 5/IE/2r1Ww4t0bQMyZAe0qgcjSCf+Yvl77SJVLeBHc4p5oCziAc3NDUlsYB7hnco9ldE 04JFSbhHjkdPiD7d0rQZ/O3T/LXJSERypnjIEhfh1Bry7JQtkNFcT2yFcBtjk2Gvw92j NNYLIcSrrEA8kf0kwzJvMqomrEV6HvE+jZGaYrxIq1KG9/CIlzBlB1TlBswvs8R8H51q ZKuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=f2VFFO2N; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-163621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163621-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m17-20020a50d7d1000000b005721518b6f6si9645289edj.50.2024.04.30.02.10.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 02:10:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=f2VFFO2N; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-163621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163621-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 27B7E1F23F7E for ; Tue, 30 Apr 2024 09:10:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 121D2127E05; Tue, 30 Apr 2024 09:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="f2VFFO2N" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 346CC4501C for ; Tue, 30 Apr 2024 09:10:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468240; cv=none; b=SgRD6hRUfTsUZhLR6s2pU9Cs8qJfgY2R0nDZEoXxjR54Su7rG0ylxh+9Gh9KHXvCVI8E2BHFlUyGxyklhN+HGY4mvmDO+oR1mblBfwQngtcWvnmniOWIZWiQb/k88zmT2TfRQTIGXvFYGkkRlogo9ObFxTpqsxoXBUNUZbyitjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468240; c=relaxed/simple; bh=EnpC8uxdaBLW+uWUMw9JJXC1K+AjyDTh9tv4xrNIOPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Yk3e6KiGZVPQ/pju924+8RjCU4dq1rML4B6sEBsQwCUJv2XtTQk3ei/KUFbB0h/TCXWrp4ZexMxBC4taxVmA3EFp67LpQEK41G5wry1O3E65b5yiQpoosC3V8OJC3kdtYbfdQ3WWvcZtWmi1QMCRxdqXuPiF8Jd048gShKann+Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=f2VFFO2N; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=QJb4 ulNH2VMgB23s2bKMJ77ejPMzfrg0P2qy+6olDX4=; b=f2VFFO2NU+TWRiqZ/1o9 4J6WInkbsJkiez5lhD2sEvYzfWiIJXZ70xNiNBDKGMwpTmXZ2O/ZmjA5lqgLwBoq f61buPFYT3ZfjTd5tuNDAhzYz0dToa5H/WqFBMryj0X3ViTaDws9Glx++eKhdpPC Nwi0tnlAK3E2w7JkyzO7UE3nOrVBV1gdadLwO/uf1PETVzpEjEvPgFPFlei9eHSc rED5CxPg7bLUcxRRrKZNnL42jbzC8Zr4L7sN2UjaRHyNhLVO7OPKf0urtiF1dZpP g/7l20tEfqk++x+WZgVj5SUmyajdyBdswyhJzNh+kxE+F8SkXroUvCKiBo3qRGf2 uw== Received: (qmail 2570745 invoked from network); 30 Apr 2024 11:10:33 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 30 Apr 2024 11:10:33 +0200 X-UD-Smtp-Session: l3s3148p1@tPMKvkwXBJtehhrb Date: Tue, 30 Apr 2024 11:10:33 +0200 From: Wolfram Sang To: Claudiu Beznea Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea , Hien Huynh Subject: Re: [PATCH v2] mmc: renesas_sdhi: Set the SDBUF after reset Message-ID: Mail-Followup-To: Wolfram Sang , Claudiu Beznea , ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea , Hien Huynh References: <20240410135416.2139173-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n7owwzlqyi25o6qu" Content-Disposition: inline In-Reply-To: <20240410135416.2139173-1-claudiu.beznea.uj@bp.renesas.com> --n7owwzlqyi25o6qu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Claudiu, On Wed, Apr 10, 2024 at 04:54:16PM +0300, Claudiu Beznea wrote: > For development purpose, renesas_sdhi_probe() could be called w/ > dma_ops =3D NULL to force the usage of PIO mode. In this case the > renesas_sdhi_enable_dma() will not be called before transferring data. >=20 > 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. >=20 > 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. So, I tried to find a place where we would need only one call to renesas_sdhi_sdbuf_width() but I also couldn't find a sweet spot. So, this approach seems also best to me. > + > + /* > + * In case the controller works in PIO mode the SDBUF > + * needs to be set as its reset value is zero. > + */ But I think we can shorten the above comment to something like: /* Ensure default value for this driver */ > + renesas_sdhi_sdbuf_width(host, 16); D'accord? Happy hacking, Wolfram --n7owwzlqyi25o6qu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmYwtYUACgkQFA3kzBSg KbYqdhAAh1BHkpYuhh4UgC9lTha0M8cRwfM9fPYYxLfGuMgJkUlTzNpqu1rOSsSJ QyN4vggjd5lhvLmBwNLIpeDPSt8sM2Pp2rKbyZj89SHlRShvzZkSSkWSwRDu+gbL k2l2mU/0xhrMkO3s3ZX7FcA5HGok/qb44xGMqaBVI4cvdZd4uEGPNDxXi6Yijd48 gAxLCh3PN1gwMVETT9qt9ckp2LEtFM1omIbXic/yvry1572d9ujoqCeN7E+mx8wi 26vWP1pVRCUFhTLJVysz6B5kh1JBBamjR7iSQnSl9K1dICIVkHlZF6WbAh3FBqbJ nW4C6JVl6rWg2VosQ4sBfe105PpZw3sjyuaOELh2HXFhfrFKl9QlUd4spkVqxAVz BCptmAs4PgUBaOcIoM7RrPteLvTOLprdHwWI+qJbSuMZJr0bVsYBbkcDEFXRGpdf TlwBChaFj2CFnCLAYVBTFBdLmsRGUOUhFC5PE0Ev93m7rXxd1AfiDRV3KKF0jKGW V4hNyDBrdmaSJnZb3eCQhzyJ+5SyjNQhhRO+C4qpqfMK2Yx86G77jJtVBrZTVS8n JY1cZg7fnE2Et2mmpkbw5+VrBdPks0YEU5IGDquBGQ/Iyrt7liR/dWCVtb/YsYe+ XbHVJiutlclajSwTBBfyxTggxyXdkHkXWxAnHuSm8W5WDZa4axk= =1g6D -----END PGP SIGNATURE----- --n7owwzlqyi25o6qu--