[PATCH 0/2] mmc: tmio: improve how runtime PM is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This series aims to address a issue reported by Geert [1]. It's tested 
on Renesas Gen2 and Gen3 boards and the issue reported by Geert is 
fixed. The changes to timo_mmc and uniphier-sd drivers are only compile 
tested, Yamada-san would it be possible for you to test?

With correct accounting for runtime PM the Renesas boards no longer 
switch of the clocks when suspending. I'm not sure if this is the 
intended design or nor as in tmio_mmc_host_probe() we have:

  /*
   * On Gen2+, eMMC with NONREMOVABLE currently fails because native
   * hotplug gets disabled. It seems RuntimePM related yet we need further
   * research. Since we are planning a PM overhaul anyway, let's enforce
   * for now the device being active by enabling native hotplug always.
   */
  if (pdata->flags & TMIO_MMC_MIN_RCAR2)
          _host->native_hotplug = true;

  /*   
   * While using internal tmio hardware logic for card detection, we need
   * to ensure it stays powered for it to work.
   */
  if (_host->native_hotplug)
          pm_runtime_get_noresume(&pdev->dev);

For posterity the matching output with this series applied as in Geerts 
report, the output is the same both after boot and a suspend-resume 
cycle.

grep sd /sys/kernel/debug/clk/clk_summary
             .sdsrc                   3        3        0   798720000          0     0  50000
                sd3                   1        1        0    12480000          0     0  50000
                   sdif3              3        3        0    12480000          0     0  50000
                sd2                   1        1        0   199680000          0     0  50000
                   sdif2              3        3        0   199680000          0     0  50000
                sd1                   0        0        0   199680000          0     0  50000
                   sdif1              0        0        0   199680000          0     0  50000
                sd0                   1        1        0    12480000          0     0  50000
                   sdif0              3        3        0    12480000          0     0  50000

1. https://www.spinics.net/lists/linux-mmc/msg44431.html

Niklas Söderlund (2):
  mmc: tmio: undo PM autosuspend when removing the host
  mmc: tmio: move runtime PM enablement to the driver implementations

 drivers/mmc/host/renesas_sdhi_core.c | 6 ++++++
 drivers/mmc/host/tmio_mmc.c          | 5 +++++
 drivers/mmc/host/tmio_mmc_core.c     | 3 +--
 drivers/mmc/host/uniphier-sd.c       | 3 +++
 4 files changed, 15 insertions(+), 2 deletions(-)

-- 
2.20.1




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux