[PATCH 4/5] arch/arm: mioa701 use maximum CPU frequency

Robert Jarzmik robert.jarzmik at free.fr
Tue May 15 17:21:16 EDT 2012


To speed-up linux kernel loading, switch the PXA cpu to the
maximum allowed frequency (520 MHz). This improves the load
time from several seconds to less than a second from the
MTD.

Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
---
 arch/arm/boards/mioa701/board.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/mioa701/board.c b/arch/arm/boards/mioa701/board.c
index 14c8110..ab5a493 100644
--- a/arch/arm/boards/mioa701/board.c
+++ b/arch/arm/boards/mioa701/board.c
@@ -261,8 +261,17 @@ static int mioa701_coredevice_init(void)
 	/* route pins */
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
 
-	CCCR = CCCR_A | 0x20110;
-	cclk = 0x02;
+	/*
+	 * Put the board in superspeed (520 MHz) to speed-up logo/OS loading.
+	 * This requires to command the Maxim 1586 to upgrade core voltage to
+	 * 1.475 V, on the power I2C bus (device 0x14).
+	 */
+	CCCR = CCCR_A | 0x20290;
+	PCFR = PCFR_GPR_EN | PCFR_FVC | PCFR_DC_EN | PCFR_PI2C_EN | PCFR_OPDE;
+	PCMD(0) = PCMD_LC | 0x1f;
+	PVCR = 0x14;
+
+	cclk = 0x0b;
 	asm volatile("mcr p14, 0, %0, c6, c0, 0 @ set CCLK"
 	  : : "r" (cclk) : "cc");
 
-- 
1.7.10




More information about the barebox mailing list