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] [day] [month] [year] [list]
Date:   Thu, 05 May 2022 16:38:26 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Hector Martin <marcan@...can.st>
Cc:     Rob Herring <robh@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Sven Peter <sven@...npeter.dev>,
        PCI <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] PCI: apple: Add support for optional PWREN GPIO

On Wed, 04 May 2022 04:36:02 +0100,
Hector Martin <marcan@...can.st> wrote:

[...]

> 
> So it'd go something like this:
> 
> - apcie driver, on slot activation, sees a pwren gpio/reg and powers it
> on prior to bringing up the link (and marks that port as d3cold supported)
> - sdhci-pci driver, on probe, sees an external card detect GPIO declared
> and considers that license to call pci_d3cold_enable and enable
> runtime-pm (since it won't need the internal card detect IRQ/GPIO)
> - No SD card is inserted, so SD driver goes into runtime suspend and
> saves whatever controller state it needs
> - PCI core saves whatever config space stuff it needs to save, SD
> controller is powered down via GPIO

I haven't quite found yet how this goes, but I can't say I tried in
anger. I guess that the root port device has to provide some standard
PM callbacks that would further tickle the regulator?

> - SD card is inserted, SMC GPIO IRQ notifies SD driver
> - SD driver goes out of runtime suspend
> - PCI core powers on controller, re-establishes link, restores config space
> - SD driver restores host controller registers and discovers the new card
> 
> No new APIs, this is all existing kernel stuff. PCI manages slot power
> same as it does on ACPI systems (that support it), driver interacts with
> it via runtime-pm and the d3cold control stuff.
> 
> I'm tempted to prototype this today and see how it goes...

Well, let us know how that goes.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ