From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035102AbcIZUTL (ORCPT ); Mon, 26 Sep 2016 16:19:11 -0400 Received: from gloria.sntech.de ([95.129.55.99]:47695 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033024AbcIZUTK (ORCPT ); Mon, 26 Sep 2016 16:19:10 -0400 From: Heiko Stuebner To: Douglas Anderson Cc: linux-rockchip@lists.infradead.org, zhangqing@rock-chips.com, wxt@rock-chips.com, zhengxing@rock-chips.com, dbasehore@chromium.org, shawn.lin@rock-chips.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] soc: rockchip: power-domain: Don't (incorrectly) set rk3399 up/down counts Date: Mon, 26 Sep 2016 22:18:42 +0200 Message-ID: <3409868.mFCNHRg95O@phil> User-Agent: KMail/5.2.3 (Linux/4.6.0-1-amd64; KDE/5.25.0; x86_64; ; ) In-Reply-To: <1471546561-4459-1-git-send-email-dianders@chromium.org> References: <1471546561-4459-1-git-send-email-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, 18. August 2016, 11:56:01 CEST schrieb Douglas Anderson: > On rk3288 it was important that powerdown and powerup counts for the > CPU/GPU in the kernel because: > * The power on default was crazy long. > * We couldn't rely on the firmware to set this up because really this > wasn't the firmware's job--the kernel was the only one that really > cared about bringing up / down CPUs and the GPU and doing suspend / > resume (which involves bringing up / down CPUs). > > On newer ARM systems (like rk3399) ARM Trusted Firmware is in charge of > bringing up and down the CPUs and it really should be in charge of > setting all these counts right. After all ATF is in charge of suspend / > resume and CPU up / down. Let's get out of the way and let ATF do its > job. > > A few other motivations for doing this: > * Depending on another configuration (PMU_24M_EN_CFG) these counts can > be either in 24M or 32k cycles. Thus, though ATF isn't really so > involved in bringing up the GPU, ATF should probably manage the counts > for everything so it can also manage the 24M / 32k choice. > * It turns out that (right now) 24M mode is broken on rk3399 and not > being used. That means that the count the kernel was programming > in (24) was not 1 us (which it seems was intended) but was actually > .75 ms > * On rk3399 there are actually 2 separate registers for setting CPU > up/down time plus 1 register for GPU up/down time. The curent kernel > code actually was putting the register for the "little" cores in the > "CPU" slot and the register for the "big" cores in the "GPU" slot. It > was never initting the GPU counts. > > Note: this change assumes that ATF will actually set these values at > boot, as I'm proposing in . > > Signed-off-by: Douglas Anderson applied to my drivers branch for 4.10 Thanks Heiko