mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v11 0/6] mmc: core: Keep the card powered across suspend when firmware needs it live
@ 2026-10-30 18:10 Kamal Dasu
  2026-10-30 18:10 ` [PATCH v11 1/6] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO Kamal Dasu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Kamal Dasu @ 2026-10-30 18:10 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson
  Cc: Ulf Hansson, Adrian Hunter, Florian Fainelli, Wolfram Sang,
	Oleksij Rempel, linux-kernel, devicetree, Rob Herring,
	Conor Dooley, Krzysztof Kozlowski, Krzysztof Kozlowski,
	Krzysztof Kozlowski, Shawn Lin

Background: on brcmstb boards with a Kioxia 016G01 eMMC, firmware accesses the
card directly during resume from Suspend-to-DRAM, before the kernel's own
resume path runs, in order to load boot code using hard wired logic that is not
field updatable. The card needs to stay powered and responsive for that access
to succeed, and since it is never power-cycled, it also needs to be reset
before the kernel reuses it after resume.

Ulf's v10 posted patches 3-6 and I'm resending the whole series, as requested.

v10: https://lore.kernel.org/linux-mmc/20261027144051.249211-1-ulf.hansson@oss.qualcomm.com/

Changes in v11:
	- Rebased on the mmc tree's next branch.
	- Patch 1, 2: Resent by the author to complete the Signed-off-by
	chain, with the DT list and maintainers on Cc.
	- Patch 3-6: Added my Signed-off-by as the submitter.
	- Patch 4: Keep the comment about suspend methods being serialized, by
	moving it into mmc_set_host_pm_flags() (Shawn Lin).
	- Patch 5: Also split the cache flush out of _mmc_hw_reset() into a new
	mmc_hw_reset_recovery(), used for the ->hw_reset() bus op, and renamed the
	patch to "Move and split reset functions for eMMC" (Ulf). The flush is
	redundant when resetting at system resume, and failed with a timeout,
	printing "mmc1: cache flush error -110" on every resume.
	- Patch 5: Dropped Shawn's Reviewed-by as the patch changed.
	- Patch 6: Claim the host around the card reset in mmc_resume(), as it
	sends commands. Without it, WARN_ON(!host->claimed) triggers for every
	command sent during the reset.
	- Patch 6: Warn while parsing the DT properties when
	reset-card-at-resume is set without keep-power-in-suspend (Ulf).
	- Patch 6: Dropped Shawn's Reviewed-by as the patch changed.

Tested on a brcmstb board with the Kioxia 016G01 eMMC, using "pml -d"
(S3 suspend/resume):

  keep-power-in-suspend  reset-card-at-resume  Result
  ---------------------  --------------------  ----------------------------
  no                     no                    Enters suspend, board resets
                                               at resume
  yes                    no                    Enters suspend, board resets
                                               at resume
  no                     yes                   Suspend aborts, -EINVAL
  yes                    yes                   S3 suspend/resume works

Kamal Dasu (2):
  dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO
  dt-bindings: mmc: Add reset-card-at-resume property

Ulf Hansson (4):
  mmc: core: Add option to keep an eMMC powered on at system suspend
  mmc: core: Split sdio_set_host_pm_flags()
  mmc: core: Move and split reset functions for eMMC
  mmc: core: Add support for resetting an eMMC at system resume

 .../bindings/mmc/mmc-controller-common.yaml   |  10 +-
 drivers/mmc/core/core.c                       |  10 ++
 drivers/mmc/core/core.h                       |   1 +
 drivers/mmc/core/host.c                       |  13 +++
 drivers/mmc/core/mmc.c                        | 105 ++++++++++++------
 drivers/mmc/core/sdio_io.c                    |   7 +-
 include/linux/mmc/host.h                      |   1 +
 7 files changed, 105 insertions(+), 42 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-10-30 18:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 18:10 [PATCH v11 0/6] mmc: core: Keep the card powered across suspend when firmware needs it live Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 1/6] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 2/6] dt-bindings: mmc: Add reset-card-at-resume property Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 3/6] mmc: core: Add option to keep an eMMC powered on at system suspend Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 4/6] mmc: core: Split sdio_set_host_pm_flags() Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 5/6] mmc: core: Move and split reset functions for eMMC Kamal Dasu
2026-10-30 18:10 ` [PATCH v11 6/6] mmc: core: Add support for resetting an eMMC at system resume Kamal Dasu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®