diff mbox

[U-Boot,2/3] mx7: Fix the get_cpu_speed_grade_hz() return values

Message ID 1487778207-16302-2-git-send-email-fabio.estevam@nxp.com
State Accepted
Commit 60a07fb843c44bdcb364ecaff11d4a54900e798b
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Feb. 22, 2017, 3:43 p.m. UTC
According to the MX7D fuse map the following speed grades are available:

800  MHz
500  MHz
1000 MHz
1200 MHz

So simply return the real frequency that corresponds to the speed grade.

With this change we see on boot:

CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 arch/arm/cpu/armv7/mx7/soc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Babic March 19, 2017, 4:32 p.m. UTC | #1
On 22/02/2017 16:43, Fabio Estevam wrote:
> According to the MX7D fuse map the following speed grades are available:
> 
> 800  MHz
> 500  MHz
> 1000 MHz
> 1200 MHz
> 
> So simply return the real frequency that corresponds to the speed grade.
> 
> With this change we see on boot:
> 
> CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  arch/arm/cpu/armv7/mx7/soc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
> index b9fb97b..8cde77b 100644
> --- a/arch/arm/cpu/armv7/mx7/soc.c
> +++ b/arch/arm/cpu/armv7/mx7/soc.c
> @@ -120,11 +120,11 @@ u32 get_cpu_speed_grade_hz(void)
>  
>  	switch(val) {
>  	case OCOTP_TESTER3_SPEED_800MHZ:
> -		return 792000000;
> +		return 800000000;
>  	case OCOTP_TESTER3_SPEED_500MHZ:
>  		return 500000000;
>  	case OCOTP_TESTER3_SPEED_1GHZ:
> -		return 996000000;
> +		return 1000000000;
>  	}
>  	return 0;
>  }
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index b9fb97b..8cde77b 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -120,11 +120,11 @@  u32 get_cpu_speed_grade_hz(void)
 
 	switch(val) {
 	case OCOTP_TESTER3_SPEED_800MHZ:
-		return 792000000;
+		return 800000000;
 	case OCOTP_TESTER3_SPEED_500MHZ:
 		return 500000000;
 	case OCOTP_TESTER3_SPEED_1GHZ:
-		return 996000000;
+		return 1000000000;
 	}
 	return 0;
 }