lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Jan 2021 15:04:15 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     JC Kuo <jckuo@...dia.com>
Cc:     gregkh@...uxfoundation.org, robh@...nel.org, jonathanh@...dia.com,
        kishon@...com, linux-tegra@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, nkristam@...dia.com
Subject: Re: [PATCH v6 15/15] xhci: tegra: Enable ELPG for runtime/system PM

On Tue, Jan 19, 2021 at 04:55:46PM +0800, JC Kuo wrote:
> This commit implements the complete programming sequence for ELPG
> entry and exit.
> 
>  1. At ELPG entry, invokes tegra_xusb_padctl_enable_phy_sleepwalk()
>     and tegra_xusb_padctl_enable_phy_wake() to configure XUSB PADCTL
>     sleepwalk and wake detection circuits to maintain USB lines level
>     and respond to wake events (wake-on-connect, wake-on-disconnect,
>     device-initiated-wake).
> 
>  2. At ELPG exit, invokes tegra_xusb_padctl_disable_phy_sleepwalk()
>     and tegra_xusb_padctl_disable_phy_wake() to disarm sleepwalk and
>     wake detection circuits.
> 
> At runtime suspend, XUSB host controller can enter ELPG to reduce
> power consumption. When XUSB PADCTL wake detection circuit detects
> a wake event, an interrupt will be raised. xhci-tegra driver then
> will invoke pm_runtime_resume() for xhci-tegra.
> 
> Runtime resume could also be triggered by protocol drivers, this is
> the host-initiated-wake event. At runtime resume, xhci-tegra driver
> brings XUSB host controller out of ELPG to handle the wake events.
> 
> The same ELPG enter/exit procedure will be performed for system
> suspend/resume path so USB devices can remain connected across SC7.
> 
> Signed-off-by: JC Kuo <jckuo@...dia.com>
> ---
> v6:
>    fix compiling warning: extra tokens at end of #ifdef directive
> v5:
>    avoid using xhci_get_rhub()
>    protect ELPG routines with (CONFIG_PM || CONFIG_PM_SLEEP)
> v4:
>    reshuffle the code to avoid these pre-declarations
> v3:
>    use 'unsigned int' for PHY index
>    remove unnecessary 'else'
>    drop IRQF_TRIGGER_HIGH when invokes devm_request_threaded_irq()
> 
>  drivers/usb/host/xhci-tegra.c | 407 ++++++++++++++++++++++++++++++----
>  1 file changed, 370 insertions(+), 37 deletions(-)

Acked-by: Thierry Reding <treding@...dia.com>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ