[Gta04-owner] [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks
NeilBrown
neilb at suse.de
Wed Mar 25 22:49:26 CET 2015
On Mon, 23 Mar 2015 10:10:18 +0100 Ulf Hansson <ulf.hansson at linaro.org> wrote:
> On 24 February 2015 at 03:42, NeilBrown <neilb at suse.de> wrote:
> > @@ -941,8 +947,12 @@ void mmc_release_host(struct mmc_host *host)
> >
> > WARN_ON(!host->claimed);
> >
> > - if (host->ops->disable && host->claim_cnt == 1)
> > - host->ops->disable(host);
> > + if (host->claim_cnt == 1) {
> > + if (atomic_read(&host->sdio_narrowed) == 1)
> > + atomic_set(&host->sdio_narrowed, 0);
> > + if (host->ops->disable)
> > + host->ops->disable(host);
> > + }
>
> As omap_hsmmc in currently the only user of the
> host_ops->enable|disable() callbacks, I wonder if this approach will
> work "race-free" for those hosts that don't implement these callbacks?
Hi Ulf,
you might have guessed, but to be explicit: I withdraw this patchset.
I much prefer the other approach that I suggested using runtime PM on
the mmc_host device and switching to 1-bit more in the pm_runtime_suspend
function.
As you say, omap_hsmmc is the only user of enable/disable and they were an
important part of my strategy in this patchset.
Which raises the question: what is omap_hsmmc using enable/disable?
My guess is that it is largely historical - added because omap_hsmmc wanted
runtime pm before sufficient generic infrastructure was available.
I've tested a patch to remove it, and it seem fine. I'll post it.
Thanks,
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20150326/4fef0342/attachment.asc>
More information about the Gta04-owner
mailing list