shithub: riscv

Download patch

ref: 7a225e5331749e1c656661f7c1c5cc2767aa13d8
parent: 438f5e951fecbdac38e36f7a01ed31c78b14320e
author: cinap_lenrek <[email protected]>
date: Sat Jul 30 08:44:43 EDT 2022

imx8: increase cpu frequency from 1.4 to 1.6ghz

the RM seems to be outdated in this regard, saying
the core is targeted at 1.4ghz.

--- a/sys/src/9/imx8/ccm.c
+++ b/sys/src/9/imx8/ccm.c
@@ -146,7 +146,7 @@
 };
 
 static int input_clk_freq[] = {
-	[ARM_PLL_CLK] 1400*Mhz, 
+	[ARM_PLL_CLK] 1600*Mhz, 
 	[GPU_PLL_CLK] 1600*Mhz,
 	[VPU_PLL_CLK] 800*Mhz,
 	[DRAM_PLL1_CLK] 800*Mhz,
@@ -1015,7 +1015,8 @@
 	&& ((reg[1] ^ cfg1) & ~(1<<31)) == 0)
 		return;
 
-	reg[0] |= 1<<14;	/* bypass */
+	/* bypass */
+	reg[0] |= 1<<14;
 
 	reg[1] = cfg1;
 
--- a/sys/src/9/imx8/clock.c
+++ b/sys/src/9/imx8/clock.c
@@ -46,7 +46,7 @@
 
 		/* TURBO! */
 		setclkrate("ccm_arm_a53_clk_root", "osc_25m_ref_clk", 25*Mhz);
-		setclkrate("ccm_arm_a53_clk_root", "arm_pll_clk", 1400*Mhz);
+		setclkrate("ccm_arm_a53_clk_root", "arm_pll_clk", 1600*Mhz);
 	}
 	tstart = sysrd(CNTPCT_EL0);
 	do{