Re: [PATCH 4.19 04/74] ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
Hi, On Mon, Aug 5, 2019 at 7:47 AM Pavel Machek wrote: > > On Mon 2019-08-05 15:02:17, Greg Kroah-Hartman wrote: > > [ Upstream commit 8ef1ba39a9fa53d2205e633bc9b21840a275908e ] > > > > This is similar to commit e6186820a745 ("arm64: dts: rockchip: Arch > > counter doesn't tick in system suspend"). Specifically on the rk3288 > > it can be seen that the timer stops ticking in suspend if we end up > > running through the "osc_disable" path in rk3288_slp_mode_set(). In > > that path the 24 MHz clock will turn off and the timer stops. > > > > To test this, I ran this on a Chrome OS filesystem: > > before=$(date); \ > > suspend_stress_test -c1 --suspend_min=30 --suspend_max=31; \ > > echo ${before}; date > > > > ...and I found that unless I plug in a device that requests USB wakeup > > to be active that the two calls to "date" would show that fewer than > > 30 seconds passed. > > > > NOTE: deep suspend (where the 24 MHz clock gets disabled) isn't > > supported yet on upstream Linux so this was tested on a downstream > > kernel. > > I guess this does no harm, but deep sleep is unlikely to be suppored > in the stable kernels, so ... is it good idea there? People do merge stable kernels into local trees which have extra patches (which might enable deep sleep). Chrome OS is an example of this. If the patch does no harm then merging it seems nice. That being said: we already have this in the Chrome OS tree, so unless someone else is also mering stable into their tree and trying to support rk3288 with deep sleep, this patch is unlikely to matter. ...so if everyone doesn't want it then it won't bother me. -Doug
Re: [PATCH 4.19 04/74] ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
On Mon 2019-08-05 15:02:17, Greg Kroah-Hartman wrote: > [ Upstream commit 8ef1ba39a9fa53d2205e633bc9b21840a275908e ] > > This is similar to commit e6186820a745 ("arm64: dts: rockchip: Arch > counter doesn't tick in system suspend"). Specifically on the rk3288 > it can be seen that the timer stops ticking in suspend if we end up > running through the "osc_disable" path in rk3288_slp_mode_set(). In > that path the 24 MHz clock will turn off and the timer stops. > > To test this, I ran this on a Chrome OS filesystem: > before=$(date); \ > suspend_stress_test -c1 --suspend_min=30 --suspend_max=31; \ > echo ${before}; date > > ...and I found that unless I plug in a device that requests USB wakeup > to be active that the two calls to "date" would show that fewer than > 30 seconds passed. > > NOTE: deep suspend (where the 24 MHz clock gets disabled) isn't > supported yet on upstream Linux so this was tested on a downstream > kernel. I guess this does no harm, but deep sleep is unlikely to be suppored in the stable kernels, so ... is it good idea there? Thanks, Pavel > --- a/arch/arm/boot/dts/rk3288.dtsi > +++ b/arch/arm/boot/dts/rk3288.dtsi > @@ -227,6 +227,7 @@ > IRQ_TYPE_LEVEL_HIGH)>, > IRQ_TYPE_LEVEL_HIGH)>; > clock-frequency = <2400>; > + arm,no-tick-in-suspend; > }; > > timer: timer@ff81 { -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html signature.asc Description: Digital signature
[PATCH 4.19 04/74] ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
[ Upstream commit 8ef1ba39a9fa53d2205e633bc9b21840a275908e ] This is similar to commit e6186820a745 ("arm64: dts: rockchip: Arch counter doesn't tick in system suspend"). Specifically on the rk3288 it can be seen that the timer stops ticking in suspend if we end up running through the "osc_disable" path in rk3288_slp_mode_set(). In that path the 24 MHz clock will turn off and the timer stops. To test this, I ran this on a Chrome OS filesystem: before=$(date); \ suspend_stress_test -c1 --suspend_min=30 --suspend_max=31; \ echo ${before}; date ...and I found that unless I plug in a device that requests USB wakeup to be active that the two calls to "date" would show that fewer than 30 seconds passed. NOTE: deep suspend (where the 24 MHz clock gets disabled) isn't supported yet on upstream Linux so this was tested on a downstream kernel. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin --- arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index c706adf4aed2f..440d6783faca5 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -227,6 +227,7 @@ , ; clock-frequency = <2400>; + arm,no-tick-in-suspend; }; timer: timer@ff81 { -- 2.20.1