2009-09-24 11:12:24 Setting minimal frequency for CPU frequency scaling
Leonid Volpert (UNITED STATES)
Message: 80391
Hi,
In our new product we are using BF-527 with core frequency 384MHz and sys frequency 96MHz.
By utilizing 'userspace' governor we can efficiently control core frequency from user space between 384 MHz and 192 MHz if DCACHE is enabled and between 384 MHz and 96 MHz if it's not
There is the following restriction in linux-2.6.x/arch/blackfin/mach-common/cpufreq.c that doesn't allow us to have at the same time minimal frequency 96MHz and DCACHE enabled.
#if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
min_cclk = sclk * 2;
#else
min_cclk = sclk;
#endif
What is the reason to have this restriction?
Is there any chance to bypass it?
Thanks,
Leonid
.
QuoteReplyEditDelete
2009-09-24 14:41:22 Re: Setting minimal frequency for CPU frequency scaling
Robin Getz (UNITED STATES)
Message: 80397
Leonid:
try:
svn annotate linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
4656 hennerich
6330 sonicz #if ANOMALY_05000273 || ANOMALY_05000274 || \
6749 jiez (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_EXTMEM_DCACHEABLE))
4656 hennerich min_cclk = sclk * 2;
then, when you know what revision you want to look at:
svn log linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
------------------------------------------------------------------------
r6749 | jiez | 2009-06-16 05:48:33 -0400 (Tue, 16 Jun 2009) | 23 lines
[!no_src_qa!]Refine Blackfin cache configure options.
to look at that change -- svn diff -r 6748:6749 linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
Index: linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
===================================================================
--- linux-2.6.x/arch/blackfin/mach-common/cpufreq.c (revision 6748)
+++ linux-2.6.x/arch/blackfin/mach-common/cpufreq.c (revision 6749)
@@ -141,7 +141,7 @@
sclk = get_sclk() / 1000;
#if ANOMALY_05000273 || ANOMALY_05000274 || \
- (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
+ (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_EXTMEM_DCACHEABLE))
min_cclk = sclk * 2;
#else
so that isn't anything but a name change. Then it is:
r6330 | sonicz | 2009-05-07 22:43:24 -0400 (Thu, 07 May 2009) | 3 lines
Task[5094] reword workaround for anomaly 05000274.
svn diff -r 6329:6748 linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
Index: linux-2.6.x/arch/blackfin/mach-common/cpufreq.c
===================================================================
--- linux-2.6.x/arch/blackfin/mach-common/cpufreq.c (revision 6329)
+++ linux-2.6.x/arch/blackfin/mach-common/cpufreq.c (revision 6748)
@@ -140,7 +140,8 @@
cclk = get_cclk() / 1000;
sclk = get_sclk() / 1000;
-#if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
+#if ANOMALY_05000273 || ANOMALY_05000274 || \
+ (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
min_cclk = sclk * 2;
#else
min_cclk = sclk;
So -- it is something Sonic added. I'm not sure why, and it isn't in the log, or associated with a bug, so he will need to explain.
-Robin
QuoteReplyEditDelete
2009-09-24 14:48:06 Re: Setting minimal frequency for CPU frequency scaling
Mike Frysinger (UNITED STATES)
Message: 80399
nah, that doesnt go back far enough. it's faster with `git log -p`.
svn rev 4661 is what you want by Michael:
[#3862] Cleanup Kconfig, fix comment and make sure we exclude CCLK=SCLK for some configurations
--- a/arch/blackfin/mach-common/cpufreq.c
+++ b/arch/blackfin/mach-common/cpufreq.c
@@ -134,7 +134,7 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
cclk = get_cclk();
sclk = get_sclk();
-#if ANOMALY_05000273
+#if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
min_cclk = sclk * 2;
#else
min_cclk = sclk;
QuoteReplyEditDelete
2009-09-29 09:26:28 Re: Setting minimal frequency for CPU frequency scaling
Leonid Volpert (UNITED STATES)
Message: 80634
Thanks for your help.
Just curious from where this exclusion CCLK=SCLK is coming, is it Linux or Blackfin itself?
Thanks again
Leonid.
QuoteReplyEditDelete
2009-09-29 15:01:49 Re: Setting minimal frequency for CPU frequency scaling
Robin Getz (UNITED STATES)
Message: 80649
Leonid:
It is the Blackfin. We could not make things work reliably without this change, and reported it to the hardware team, and have been waiting for an answer back. We When you posted - we poked them again, and they said they would look into it.
-Robin
QuoteReplyEditDelete
2009-09-30 09:42:17 Re: Setting minimal frequency for CPU frequency scaling
Leonid Volpert (UNITED STATES)
Message: 80714
Thank you, Robin.
Looking forward to have more information from hardware team.
Leonid.