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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C906CC64EBC for ; Tue, 2 Oct 2018 23:01:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9343B20878 for ; Tue, 2 Oct 2018 23:01:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9343B20878 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=the-dreams.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbeJCFrB (ORCPT ); Wed, 3 Oct 2018 01:47:01 -0400 Received: from sauhun.de ([88.99.104.3]:49838 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727221AbeJCFrB (ORCPT ); Wed, 3 Oct 2018 01:47:01 -0400 Received: from localhost (p54B330B2.dip0.t-ipconnect.de [84.179.48.178]) by pokefinder.org (Postfix) with ESMTPSA id A2DEA2C7D2D; Wed, 3 Oct 2018 01:01:15 +0200 (CEST) Date: Wed, 3 Oct 2018 01:01:15 +0200 From: Wolfram Sang To: Masahiro Yamada Cc: Wolfram Sang , linux-mmc@vger.kernel.org, Ulf Hansson , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mmc: tmio: move MFD variant reset to a platform hook Message-ID: <20181002230115.GB812@kunai> References: <1538397062-19162-1-git-send-email-yamada.masahiro@socionext.com> <1538397062-19162-2-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline In-Reply-To: <1538397062-19162-2-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Yamada-san, On Mon, Oct 01, 2018 at 09:31:01PM +0900, Masahiro Yamada wrote: > CTL_RESET_SDIO register is specific to the TMIO MFD (tmio_mmc.c). >=20 > Add a new hook host->reset for performing a platform-specific reset > sequence, and move CTL_RESET_SDIO over there. >=20 > Signed-off-by: Masahiro Yamada I like it in general. > +static void tmio_mmc_reset(struct tmio_mmc_host *host) > +{ > + sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); > + usleep_range(10000, 11000); > + sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); > + usleep_range(10000, 11000); > +} > + Are you sure resetting SDIO works independently of resetting SD? Maybe we should add resetting SD here, too, to keep the pattern... > --- a/drivers/mmc/host/tmio_mmc_core.c > +++ b/drivers/mmc/host/tmio_mmc_core.c > @@ -164,14 +164,13 @@ static void tmio_mmc_reset(struct tmio_mmc_host *ho= st) > { > /* FIXME - should we set stop clock reg here */ > sd_ctrl_write16(host, CTL_RESET_SD, 0x0000); > - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) > - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); > usleep_range(10000, 11000); > sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); > - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) > - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); > usleep_range(10000, 11000); =2E.. and have this simplified reset pattern either also in a seperate function, or doing... > =20 > + if (host->reset) > + host->reset(host); else simplified_reset_pattern ? What's your opinion? Regards, Wolfram --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAluz+LsACgkQFA3kzBSg KbZjpg//SLluqM1Huz74ZSqUTGeIfpin4OLgALKBMIcZCrX51riSpKsHhuLyYWqs AgZGDET8Ye5AlC5E3bPvY4rWXG2c3t55VbNt5hGcqvU78xekqGwSMjUBGrD0grs5 eYUvReRihz4oGOqDIp2cu9Jjy4nM78FYTVMV6RjVMXWGaeuob9UWxip1S7L8acNd +bsWcaApoqfDh6Rt4HhighW94OxGTx38Io+LcbwUFOV4gMlGo0GzPvcelNvS3CJ0 TeQwuscF5txjLfyVbz+pcPARKyDun1xjYekOGKr97Kp+8dQbQwPlSiqSq9oPrf/S N4bDNGREifbY50FU2mtQbEfrF48NJ3F6x1pLUDXICMTrp260K5XFEiPNjXScZLch zT2OUyf8QuCjsl1PsaM/DJFjiPcy1v9R2PYYLls3dS4PiVT8w07jV6xCbOX3pw+n zECu9zPBJE2X/tSrZQqtCl7MNjem+AIbUrAtGotBPlGXjoOzzlPKlu9LxRMzEx8h 5sqC5dQh36zX/ShkKllHiuhB0aIs+dNLzcT/gZbJJidONHOd6fpmIKegLJJEA7kF 2cA2zqSSTS3uI3fpwCuWU+BACiMrBBAwYPRNdCAtwWqdcdZyby/KATPCQG/HLW39 yW9WfRLACN5HhwUTFWvRiLuV+cM7aN4EfbPHcBsW8XUCz0WOUv0= =fc5y -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--