mmc: switch to 1-bit mode which stopping clocks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 0 repliesNew
- v13 patches 2 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.drivers/ | +12 | 0 replies | |
| 2/4 | mmc: core: allow non-blocking form of mmc_claim_hostdrivers/ | +2 | 0 replies | |
| 3/4 | mmc: sdio: support switching to 1-bit before turning off clocksdrivers/ drivers/ include/ +1 more | +59 | 0 replies | |
| 4/4 | mmc: omap_hsmmc: switch to 1-bit before stopping clocks.drivers/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH-v2 0/4] mmc: switch to 1-bit mode which stopping clocks.
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