Patchwork [U-Boot] tegra2: trivially enable 13 mhz crystal frequency

login
register
mail settings
Submitter Lucas Stach
Date May 1, 2012, 10:50 p.m.
Message ID <1335912605-11496-1-git-send-email-dev@lynxeye.de>
Download mbox | patch
Permalink /patch/156335/
State Accepted
Commit b8cb5194f004429af13a2c616bef923b70ca1b9e
Headers show

Comments

Lucas Stach - May 1, 2012, 10:50 p.m.
This is needed for upcoming Toradex Colibri T20 upstream support.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/cpu/armv7/tegra2/clock.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Stephen Warren - May 2, 2012, 3:22 p.m.
On 05/01/2012 04:50 PM, Lucas Stach wrote:
> This is needed for upcoming Toradex Colibri T20 upstream support.

You probably want to CC the Tegra maintainer, so he notices this patch.
I've done so here.
Marek Vasut - May 3, 2012, 12:14 a.m.
Dear Lucas Stach,

> This is needed for upcoming Toradex Colibri T20 upstream support.

Neat, you're doing support for this board? That'd be great to have :) Keep me in 
CC, I have one and I'd be glad to review patches. (I hope you noticed the work 
of antmicro on the tegra/u-boot)

> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  arch/arm/cpu/armv7/tegra2/clock.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7/tegra2/clock.c
> b/arch/arm/cpu/armv7/tegra2/clock.c index 39376ab..8084631 100644
> --- a/arch/arm/cpu/armv7/tegra2/clock.c
> +++ b/arch/arm/cpu/armv7/tegra2/clock.c
> @@ -1027,7 +1027,10 @@ void clock_early_init(void)
>  		clock_set_rate(CLOCK_ID_CGENERAL, 600, 26, 0, 8);
>  		break;
> 
> -	case CLOCK_OSC_FREQ_13_0:
> +	case CLOCK_OSC_FREQ_13_0: /* OSC is 13Mhz */
> +		clock_set_rate(CLOCK_ID_PERIPH, 432, 13, 1, 8);
> +		clock_set_rate(CLOCK_ID_CGENERAL, 600, 13, 0, 8);
> +		break;
>  	case CLOCK_OSC_FREQ_19_2:
>  	default:
>  		/*

Best regards,
Marek Vasut

Patch

diff --git a/arch/arm/cpu/armv7/tegra2/clock.c b/arch/arm/cpu/armv7/tegra2/clock.c
index 39376ab..8084631 100644
--- a/arch/arm/cpu/armv7/tegra2/clock.c
+++ b/arch/arm/cpu/armv7/tegra2/clock.c
@@ -1027,7 +1027,10 @@  void clock_early_init(void)
 		clock_set_rate(CLOCK_ID_CGENERAL, 600, 26, 0, 8);
 		break;
 
-	case CLOCK_OSC_FREQ_13_0:
+	case CLOCK_OSC_FREQ_13_0: /* OSC is 13Mhz */
+		clock_set_rate(CLOCK_ID_PERIPH, 432, 13, 1, 8);
+		clock_set_rate(CLOCK_ID_CGENERAL, 600, 13, 0, 8);
+		break;
 	case CLOCK_OSC_FREQ_19_2:
 	default:
 		/*