From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] ARM: EXYNOS5: save CLK_TOP_SRC3 register before powergating
Date: Thu, 27 Dec 2012 16:23:31 +0100 [thread overview]
Message-ID: <1630653.cgu5QYax72@amdc1227> (raw)
In-Reply-To: <1356006378-17441-4-git-send-email-prasanna.ps@samsung.com>
Hi Prasanna,
On Thursday 20 of December 2012 17:56:18 Prasanna Kumar wrote:
> This patch adds a software workaround to the hardware
> problem found in exynos5 while powergating.
>
> It is observed that CLK_TOP_SRC3 register gets modified if
> the G-Scaler/MFC devices are power gated. The clock for G-Scaler gets
> set to XXTI which results in the device running very slow .
> A big drop in performance is noticed whilerunning the video.
> This issue also occurs while powergating MFC.
>
> The value of clock source register is restored once the powergating
> operation is completed.
>
> Signed-off-by: Prasanna Kumar <prasanna.ps@samsung.com>
> ---
> arch/arm/mach-exynos/pm_domains.c | 27 +++++++++++++++++++++++++++
> 1 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/pm_domains.c
> b/arch/arm/mach-exynos/pm_domains.c index 9f1351d..bd8a41e 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -24,6 +24,8 @@
>
> #include <mach/regs-pmu.h>
> #include <plat/devs.h>
> +#include <mach/regs-clock.h>
> +#include <plat/cpu.h>
>
> /*
> * Exynos specific wrapper around the generic power domain
> @@ -41,6 +43,24 @@ static int exynos_pd_power(struct generic_pm_domain
> *domain, bool power_on) void __iomem *base;
> u32 timeout, pwr;
> char *op;
> + u32 tmp = 0;
> +
> + /*
> + *It is found that the CLK SRC register in exynos5
> + *gets modified when power domain of gsc/mfc/isp/disp1
> + *is powered off.This happens only after the system is
> + *suspended and resumed and not before that.
> + *The following fix adresses this hardware issue.
> + *It saves the value of clock source register and
> + *resores it later
> + */
> +
> + if (of_machine_is_compatible("samsung,exynos5250")) {
> + if (!power_on) {
> + /* save clock source register */
> + tmp = __raw_readl(EXYNOS5_CLKSRC_TOP3);
I really think this problem needs more investigation, but if gating
a power domain can really change a clock source register and save/restore
when gating is really required, then the code must be reworked so it does
not access clock registers directly.
At the moment it is not a problem, but we are going to have Exynos support
for Common Clock Framework merged in near future and it will remove static
mapping of clock registers.
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Linux Platform
next prev parent reply other threads:[~2012-12-27 15:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 12:22 [PATCH 0/3]ARM: Exynos5 : Add Power domain device tree support and fix for hardware issue Prasanna Kumar
2012-11-27 12:22 ` [PATCH 1/3] ARM: dts: exynos5: Set up power domain for MFC and G-scaler Prasanna Kumar
2012-12-04 9:05 ` Thomas Abraham
2012-11-27 12:22 ` [PATCH 2/3] arm: exynos5: Enable PM generic domain support in Kconfig Prasanna Kumar
2012-12-04 9:07 ` Thomas Abraham
2012-11-27 12:22 ` [PATCH 3/3] ARM: EXYNOS5: save CLK_TOP_SRC3 register before powergating Prasanna Kumar
2012-12-04 8:59 ` Thomas Abraham
2012-12-07 12:49 ` Prasanna Kumar
2012-12-20 12:26 ` [PATCH v2 0/3] ARM: Exynos5 : Add Power domain device tree support and fix for hardware issue Prasanna Kumar
2012-12-20 12:26 ` [PATCH v2 1/3] ARM: dts: exynos5: Set up power domain for MFC,G-scaler,MAU and ISP Prasanna Kumar
2012-12-27 4:58 ` Prasanna Kumar
2012-12-20 12:26 ` [PATCH v2 2/3] arm: exynos5: Enable PM generic domain support in Kconfig Prasanna Kumar
2012-12-20 12:26 ` [PATCH v2 3/3] ARM: EXYNOS5: save CLK_TOP_SRC3 register before powergating Prasanna Kumar
2012-12-20 21:06 ` tomasz.figa at gmail.com
2012-12-21 1:37 ` jonghwan Choi
2012-12-24 4:26 ` Prasanna Kumar
2012-12-24 5:42 ` Prasanna Kumar
2012-12-24 4:18 ` Prasanna Kumar
2012-12-27 15:23 ` Tomasz Figa [this message]
2012-12-27 14:51 ` [PATCH " Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1630653.cgu5QYax72@amdc1227 \
--to=t.figa@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox