]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 8 Mar 2018 15:17:16 +0000 (17:17 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:28:35 +0000 (12:28 +0200)
commit7745fefcf8a70d94de58c44dd6888b8540e70b3d
tree4fdbc7089182a9e67a36f22b173205f7f7bb324a
parentd84e08f8d4a4b86ba96fee8a149962ece9743f36
usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit d56e57ca030c8b4296944a2ae61ac167bf979c07 ]

This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat:
enable clk in resume timing") because this driver also has runtime PM
and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module
clocks during resume") will restore the clock on R-Car H3 environment.

If the xhci_plat_suspend() disables the clk, the system cannot enable
the clk in resume like the following behavior:

< In resume >
 - genpd_resume_noirq() runs and enable the clk (enable_count = 1)
 - cpg_mssr_resume_noirq() restores the clk register.
  -- Since the clk was disabled in suspend, cpg_mssr_resume_noirq()
     will disable the clk and keep the enable_count.
 - Even if xhci_plat_resume() calls clk_prepare_enable(), since
   the enable_count is 1, the clk will be not enabled.

After this patch is applied, the cpg-mssr driver will save the clk
as enable, so the clk will be enabled in resume.

Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/host/xhci-plat.c