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:	Sat, 10 Oct 2015 14:13:51 +0200
From:	Marcin Wojtas <mw@...ihalf.com>
To:	Jisheng Zhang <jszhang@...vell.com>
Cc:	linux-kernel@...r.kernel.org,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Andrew Lunn <andrew@...n.ch>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Jason Cooper <jason@...edaemon.net>,
	Tawfik Bayouk <tawfik@...vell.com>,
	Grzegorz Jaszczyk <jaz@...ihalf.com>, nadavh@...vell.com,
	Lior Amsalem <alior@...vell.com>,
	Gregory Clément 
	<gregory.clement@...e-electrons.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Subject: Re: [PATCH v2 2/5] mmc: sdhci-pxav3: enable usage of DAT3 pin as HW
 card detect

Hi Jisheng,


>>
>> >>
>> >> When using DAT3-based detection Armada 38x SDIO IP expects its internal
>> >> clock to be always on, which had to be ensured twofold:
>> >
>> > What happen if runtime suspend disables its core clk and axi clk? I guess
>> > dat3-based detection isn't compatible with runtime pm. If so, do we also
>> > need to disable runtime pm in probe function?
>>
>> Is runtime resume supposed to be triggered by card detection? Is there
>
> I think so. Take marvell berlin for example, card insert => gpio interrupt
> or => sdhci runtime resume.
>
>> a way to manually trigger runtime suspend and resume of sdhci? Anyway
>
> If runtime-pm is builtin and the host driver supports runtime-pm (sdhci-pxav3
> supports runtime-pm well), when there's no sdhc transactions, runtime suspend
> will be triggered automatically after some time (50ms?)
>
>> coreclk is not a problem, as it's not used by A38x.
>
> I checked A38x dts files, it's <&gateclk 17>. So the question is: what will
> happen if <&gateclk 17> is disabled in runtime suspend? Is the dat3-based
> CD still works? In theory, it should not work any more.
>

Actually in pxav3 driver there is one obligatory clock ("io") which
can be either named in dts on not (like in armada38x.dtsi). "coreclk"
is optional, however all this does not matter, as both are disabled in
runtime_suspend function. I think that when we disable the gate clock,
dat3 detection won't work, but I guess that card detection is not the
only thing that wakes up the mmc subsystem and make runtime_pm useful.

I will try to check how it works. If there's problem with detection I
propose, in order not to spoil the code too much and not to loose all
runtime_pm benefits, to avoid disabling/enabling clock in
runtime_suspend/resume functions on a38x working with dat3 detection.
In such case sdhci_runtime_suspend/resume would execute without
problems and we will be sure that detection will work in such
configuration.

Best regards,
Marcin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ