arm: pxa: config option for PXA270 turbo mode
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
PXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
--- arch/arm/cpu/pxa/pxa2xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/cpu/pxa/pxa2xx.c +6 -1
@@ -32,6 +32,10 @@#include <common.h> #include <asm/arch/pxa-regs.h> +#ifndef CONFIG_SYS_CLKCFG +#define CONFIG_SYS_CLKCFG 0x00000002 +#endif +/* Flush I/D-cache */ static void cache_flush (void ) {
@@ -244,7 +248,8 @@ void pxa_clock_setup(void) {writel (CONFIG_SYS_CKEN ,CKEN );writel (CONFIG_SYS_CCCR ,CCCR ); - asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : :"r" (2 )); + asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : : +"r" (CONFIG_SYS_CLKCFG ));/* enable the 32Khz oscillator for RTC and PowerManager */ writel (OSCC_OON ,OSCC );
Signature · 1 line
1.7.10.4
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 5 lines
PXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
Signed-off-by Sergey Yanovich <[email protected]>
What's the difference? Where does this macro get used ?
Quoted 20 lines
--- arch/arm/cpu/pxa/pxa2xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)arch/arm/cpu/pxa/pxa2xx.c +4
-0@@ -32,6 +32,10 @@#include <common.h> #include <asm/arch/pxa-regs.h> +#ifndef CONFIG_SYS_CLKCFG +#define CONFIG_SYS_CLKCFG 0x00000002 +#endif +/* Flush I/D-cache */ static void cache_flush (void ) {
arch/arm/cpu/pxa/pxa2xx.c void pxa_clock_setup(void) · line 255
Quoted 9 lines
arch/arm/cpu/pxa/pxa2xx.c +2
-1@@ -244,7 +248,8 @@ void pxa_clock_setup(void) {writel (CONFIG_SYS_CKEN ,CKEN );writel (CONFIG_SYS_CCCR ,CCCR ); - asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : :"r" (2 )); + asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : : +"r" (CONFIG_SYS_CLKCFG ));/* enable the 32Khz oscillator for RTC and PowerManager */ writel (OSCC_OON ,OSCC );
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Marek Vasut,
Quoted 5 lines · Marek Vasut
Quoted 3 lines
PXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
What's the difference? Where does this macro get used ?
Difference -- approx. 2.5 times faster system.
Who uses it -- ex. LP-8x4x board, support for which I am trying to merge in a separate patch. Any PXA27X board can use it.
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 7 lines
Dear Marek Vasut,
Quoted 4 lines · Marek Vasut
Quoted 3 lines
PXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
Quoted 6 lines
Quoted 1 line
What's the difference? Where does this macro get used ?
Difference -- approx. 2.5 times faster system.
Who uses it -- ex. LP-8x4x board, support for which I am trying to merge in a separate patch. Any PXA27X board can use it.
Why don't you enable it globally then ?
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Marek Vasut,
Quoted 6 lines · Marek Vasut
Quoted 4 lines
Difference -- approx. 2.5 times faster system.
Who uses it -- ex. LP-8x4x board, support for which I am trying to merge in a separate patch. Any PXA27X board can use it.
Why don't you enable it globally then ?
It increases power consumption proportionally. Not everyone would agree with this. Especially those with portable devices may rightfully object.
It is up to you to enable it globally. I could alter the patch to switch turbo mode on by default and provide an option to disable it.
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 8 lines
Dear Marek Vasut,
Quoted 5 lines · Marek Vasut
Quoted 4 lines
Difference -- approx. 2.5 times faster system.
Who uses it -- ex. LP-8x4x board, support for which I am trying to merge in a separate patch. Any PXA27X board can use it.
Quoted 7 lines
Quoted 1 line
Why don't you enable it globally then ?
It increases power consumption proportionally. Not everyone would agree with this. Especially those with portable devices may rightfully object.
It is up to you to enable it globally. I could alter the patch to switch turbo mode on by default and provide an option to disable it.
Actually, I wonder if Linux's cpufreq still does depend on bootloader speed settings. Especially the turbo bit. Can you please check that? It'd be interesting to know ...
I'd say enable it by default ... I probably have all the PXA devices supported in U-Boot and I'm quite sure none of them will mind ;-)
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
[..]
Quoted 6 lines
Actually, I wonder if Linux's cpufreq still does depend on bootloader speed settings. Especially the turbo bit. Can you please check that? It'd be interesting to know ...
I'd say enable it by default ... I probably have all the PXA devices supported in U-Boot and I'm quite sure none of them will mind ;-)
Still, I'm surprised it wasn't enabled. I recall seeing it enabled. Weird ...
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
In reply to Marek VasutPXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
---
Changes for v2:
- activate turbo mode and fast bus by default
--- arch/arm/cpu/pxa/pxa2xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/cpu/pxa/pxa2xx.c +6 -1
@@ -32,6 +32,10 @@#include <common.h> #include <asm/arch/pxa-regs.h> +#ifndef CONFIG_SYS_CLKCFG +#define CONFIG_SYS_CLKCFG 0x0000000b +#endif +/* Flush I/D-cache */ static void cache_flush (void ) {
@@ -244,7 +248,8 @@ void pxa_clock_setup(void) {writel (CONFIG_SYS_CKEN ,CKEN );writel (CONFIG_SYS_CCCR ,CCCR ); - asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : :"r" (2 )); + asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : : +"r" (CONFIG_SYS_CLKCFG ));/* enable the 32Khz oscillator for RTC and PowerManager */ writel (OSCC_OON ,OSCC );
Signature · 1 line
1.7.10.4
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
In reply to Marek VasutQuoted 8 lines · Marek Vasut
Quoted 6 lines
Actually, I wonder if Linux's cpufreq still does depend on bootloader speed settings. Especially the turbo bit. Can you please check that? It'd be interesting to know ...
I'd say enable it by default ... I probably have all the PXA devices supported in U-Boot and I'm quite sure none of them will mind ;-)
Still, I'm surprised it wasn't enabled. I recall seeing it enabled. Weird ...
Yes, you are right. Linux's cpufreq-pxa2xx.c always sets the turbo bit.
However, if CONFIG_CPU_FREQ is not set (my case), bootloader's settings are used.
I work on a system that has focus on low latency (industrial controller) rather than battery life (since it has no battery).
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 11 lines · Marek Vasut
Quoted 9 lines
Quoted 6 lines
Actually, I wonder if Linux's cpufreq still does depend on bootloader speed settings. Especially the turbo bit. Can you please check that? It'd be interesting to know ...
I'd say enable it by default ... I probably have all the PXA devices supported in U-Boot and I'm quite sure none of them will mind ;-)
Still, I'm surprised it wasn't enabled. I recall seeing it enabled. Weird
...
Quoted 7 lines
Yes, you are right. Linux's
cpufreq-pxa2xx.calways sets the turbo bit.However, if
CONFIG_CPU_FREQis not set (my case), bootloader's settings are used.I work on a system that has focus on low latency (industrial controller) rather than battery life (since it has no battery).
So why not just make this patch into
-(2)
+(0xb)
instead of adding new (and undocumented ...) macro?
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Marek Vasut,
Quoted 6 lines · On Tue, 2013-05-21 at 21:25 +0200, wrote:
So why not just make this patch into
(quoted diff) +1
-1-(2) +(0xb)instead of adding new (and undocumented ...) macro?
Point taken. Looks like I am too careful in this case.
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
In reply to Marek VasutPXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
---
Changes for v3:
- make the change unconditional
Changes for v2:
- activate turbo mode and fast bus by default
--- arch/arm/cpu/pxa/pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/pxa/pxa2xx.c +1 -1
@@ -244,7 +244,7 @@ void pxa_clock_setup(void) {writel (CONFIG_SYS_CKEN ,CKEN );writel (CONFIG_SYS_CCCR ,CCCR ); - asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : :"r" (2 )); + asmvolatile ("mcr p14, 0, %0, c6, c0, 0" : :"r" (0x0b ));/* enable the 32Khz oscillator for RTC and PowerManager */ writel (OSCC_OON ,OSCC );
Signature · 1 line
1.7.10.4
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 5 lines
PXA270 CPU has turbo mode. The mode is 2.5 times faster than the default run mode. Activating the mode early significantly speeds up boot process.
Signed-off-by Sergey Yanovich <[email protected]>
OK, applied. Thanks
Best regards,
Marek Vasut
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Marek Vasut,
Quoted 1 line · Marek Vasut
OK, applied. Thanks
Thanks for your time, too.
PATCH 1/1 arm: pxa: config option for PXA270 turbo mode
Dear Sergey Yanovich,
Quoted 6 lines
Dear Marek Vasut,
Quoted 1 line · Marek Vasut
OK, applied. Thanks
Thanks for your time, too.
hey, thanks for the patch ;-)
Best regards,
Marek Vasut