All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Switch to 1-bit mode SDIO before disabling clocks.
@ 2015-02-24  2:42 NeilBrown
  2015-02-24  2:42 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: NeilBrown @ 2015-02-24  2:42 UTC (permalink / raw)
  To: Tony Lindgren, Ulf Hansson
  Cc: GTA04 owners, linux-omap, Andreas Fenkart, linux-mmc, lkml

This is a reworking of this code that I promised at the end of
January.

SDIO interrupt in 4-bit mode require the clock to be running.  So we
need to switch to 1-bit mode before turning off the clock.

This series provides infrastructure in mmc-core, and adds the
functionality to omap_hsmmc.

Thanks,
NeilBrown


---

NeilBrown (4):
      mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.
      mmc: core: allow non-blocking form of mmc_claim_host
      mmc: sdio: support switching to 1-bit before turning off clocks
      mmc: omap_hsmmc: switch to 1-bit before stopping clocks.


 drivers/mmc/core/core.c       |   21 +++++++++---
 drivers/mmc/core/sdio.c       |   74 +++++++++++++++++++++++++++++------------
 drivers/mmc/host/omap_hsmmc.c |   13 ++++++-
 include/linux/mmc/core.h      |    2 +
 include/linux/mmc/host.h      |    2 +
 5 files changed, 83 insertions(+), 29 deletions(-)

--
Signature


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH-v2 0/4] mmc: switch to 1-bit mode which stopping clocks.
@ 2015-01-30 19:05 NeilBrown
  2015-01-30 19:05 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown
  0 siblings, 1 reply; 14+ messages in thread
From: NeilBrown @ 2015-01-30 19:05 UTC (permalink / raw)
  To: Tony Lindgren, Ulf Hansson
  Cc: GTA04 owners, linux-omap, linux-mmc, linux-kernel,
	Andreas Fenkart

This is a new version which moves most of the code into
mmc/core so it is available to all drivers.

I was wrong about not being able to sleep in pm_runtime callbacks.
There are spinlocks, but not the ones I thought they were...

Anyway, I tried switching to 1-bit mode from within the
runtime_suspend callback and hit a different problem.
The sequence to switch to 1-bit involves calling set_ios
which, for omap_hsmmc at least, calls pm_runtime_get_sync().

Calling pm_runtime_get_sync from the runtime_suspend callback
deadlocks.

It would be possible to remove the pm_runtime_get_sync call
from set_ios() functions, and instead call host->enable(),
host->disable() around those mmc_set_ios() calls which don't
have the host claimed.  However that seems a bit fragile to me.

So for now I'm persisting with doing the width change from
a work-queue.  This set of patches does that.

If you think calling host->enable/disable around mmc_set_ios() calls
does make sense, I can post my other patch for review.

Thanks,
NeilBrown


---

NeilBrown (4):
      mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.
      mmc: core: allow non-blocking form of mmc_claim_host
      mmc: sdio: support switching to 1-bit before turning off clocks
      mmc: omap_hsmmc: switch to 1-bit before stopping clocks.


 drivers/mmc/core/core.c       |   21 +++++++++---
 drivers/mmc/core/sdio.c       |   74 +++++++++++++++++++++++++++++------------
 drivers/mmc/host/omap_hsmmc.c |   13 ++++++-
 include/linux/mmc/core.h      |    2 +
 include/linux/mmc/host.h      |    2 +
 5 files changed, 83 insertions(+), 29 deletions(-)

--
Signature


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-03-25 21:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24  2:42 [PATCH 0/4] Switch to 1-bit mode SDIO before disabling clocks NeilBrown
2015-02-24  2:42 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown
2015-03-03 22:53   ` Tony Lindgren
2015-03-04  5:28     ` NeilBrown
2015-03-04 15:08       ` Tony Lindgren
2015-03-23  9:10   ` Ulf Hansson
2015-03-25 21:49     ` NeilBrown
2015-02-24  2:42 ` [PATCH 1/4] mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus NeilBrown
2015-03-23  9:34   ` Ulf Hansson
2015-02-24  2:42 ` [PATCH 2/4] mmc: core: allow non-blocking form of mmc_claim_host NeilBrown
2015-03-23  9:58   ` Ulf Hansson
2015-03-23 15:19     ` Ulf Hansson
2015-02-24  2:42 ` [PATCH 4/4] mmc: omap_hsmmc: switch to 1-bit before stopping clocks NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2015-01-30 19:05 [PATCH-v2 0/4] mmc: switch to 1-bit mode which " NeilBrown
2015-01-30 19:05 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.