Message ID | 20220926192022.85660-1-adrian.hunter@intel.com |
---|---|
Headers | show |
Series | mmc: sdhci: Tidy reset handling | expand |
On Mon, 26 Sept 2022 at 21:20, Adrian Hunter <adrian.hunter@intel.com> wrote: > > Hi > > When reviewing the patch "mmc: sdhci-tegra: Issue CMD and DAT resets > together" currently on the mailing list: > > https://lore.kernel.org/linux-mmc/20220926094906.14537-3-pshete@nvidia.com/ > > it seemed like some small tidy up was needed first. Hence these patches. > > In particular, patch 4 "mmc: sdhci: Centralize CMD and DATA reset handling" > should enable the proposed quirk from the sdhci-tegra patch to be > implemented in a more consistent way. > > > Adrian Hunter (4): > mmc: sdhci: Separate out sdhci_reset_for_all() > mmc: sdhci: Remove misleading comment about resets > mmc: sdhci: Get rid of SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS > mmc: sdhci: Centralize CMD and DATA reset handling > > drivers/mmc/host/sdhci-pci-core.c | 23 ++++++++++- > drivers/mmc/host/sdhci.c | 84 ++++++++++++++++++++++++--------------- > drivers/mmc/host/sdhci.h | 2 - > 3 files changed, 73 insertions(+), 36 deletions(-) > > > Regards > Adrian Applied for next, thanks! Kind regards Uffe
On Mon, Sep 26, 2022 at 10:20:21PM +0300, Adrian Hunter wrote: > SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS is used by only ENE controllers but can > be replaced by driver code. > > Amend the ENE code to hook the ->set_ios() mmc host operation and do the > reset there. > > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci-pci-core.c | 23 ++++++++++++++++++++++- > drivers/mmc/host/sdhci.c | 8 -------- > drivers/mmc/host/sdhci.h | 2 -- > 3 files changed, 22 insertions(+), 11 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c > index ed53276f6ad9..63613b3d648f 100644 > --- a/drivers/mmc/host/sdhci-pci-core.c > +++ b/drivers/mmc/host/sdhci-pci-core.c > @@ -297,6 +297,27 @@ static const struct sdhci_pci_fixes sdhci_ricoh_mmc = { > SDHCI_QUIRK_MISSING_CAPS > }; > > +static void ene_714_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) > +{ > + struct sdhci_host *host = mmc_priv(mmc); > + > + sdhci_set_ios(mmc, ios); > + > + /* > + * Some (ENE) controllers misbehave on some ios operations, Nice rewording that you snuck in there. =) I just realized, after going through the patches that Ulf has already applied this, but FWIW, the series: Reviewed-by: Thierry Reding <treding@nvidia.com>
On Tue, 27 Sept 2022 at 17:22, Thierry Reding <thierry.reding@gmail.com> wrote: > > On Mon, Sep 26, 2022 at 10:20:21PM +0300, Adrian Hunter wrote: > > SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS is used by only ENE controllers but can > > be replaced by driver code. > > > > Amend the ENE code to hook the ->set_ios() mmc host operation and do the > > reset there. > > > > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> > > --- > > drivers/mmc/host/sdhci-pci-core.c | 23 ++++++++++++++++++++++- > > drivers/mmc/host/sdhci.c | 8 -------- > > drivers/mmc/host/sdhci.h | 2 -- > > 3 files changed, 22 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c > > index ed53276f6ad9..63613b3d648f 100644 > > --- a/drivers/mmc/host/sdhci-pci-core.c > > +++ b/drivers/mmc/host/sdhci-pci-core.c > > @@ -297,6 +297,27 @@ static const struct sdhci_pci_fixes sdhci_ricoh_mmc = { > > SDHCI_QUIRK_MISSING_CAPS > > }; > > > > +static void ene_714_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) > > +{ > > + struct sdhci_host *host = mmc_priv(mmc); > > + > > + sdhci_set_ios(mmc, ios); > > + > > + /* > > + * Some (ENE) controllers misbehave on some ios operations, > > Nice rewording that you snuck in there. =) :-) > > I just realized, after going through the patches that Ulf has already > applied this, but FWIW, the series: > > Reviewed-by: Thierry Reding <treding@nvidia.com> No problem, I will add your tag to the series. Thanks for reviewing! Kind regards Uffe