]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: at91: clock: complete the GCK's clock sources
authorWenyou Yang <wenyou.yang@atmel.com>
Mon, 11 Apr 2016 08:41:32 +0000 (16:41 +0800)
committerAndreas Bießmann <andreas@biessmann.org>
Tue, 24 May 2016 06:08:36 +0000 (08:08 +0200)
Add the UPLL clock and master clock as a clock source for getting
the generated clock frequency to complete its clock sources support.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
arch/arm/mach-at91/armv7/clock.c
arch/arm/mach-at91/include/mach/clk.h

index 27372b3f315617ef45aa73ca9b6969ee4cf7ab11..76fcada788a44be50cd6d6f0cc1181dbd2f37596 100644 (file)
@@ -236,6 +236,12 @@ u32 at91_get_periph_generated_clk(u32 id)
        case AT91_PMC_PCR_GCKCSS_PLLA_CLK:
                freq = gd->arch.plla_rate_hz;
                break;
+       case AT91_PMC_PCR_GCKCSS_UPLL_CLK:
+               freq = AT91_UTMI_PLL_CLK_FREQ;
+               break;
+       case AT91_PMC_PCR_GCKCSS_MCK_CLK:
+               freq = gd->arch.mck_rate_hz;
+               break;
        default:
                printf("Improper GCK clock source selection!\n");
                freq = 0;
index 8577c74b47b74dfe7b694c222b3bb50bdb152952..ca7d7d069542434956d11e158248e989dbf75f6c 100644 (file)
@@ -20,6 +20,8 @@
 #define GCK_CSS_MCK_CLK                4
 #define GCK_CSS_AUDIO_CLK      5
 
+#define AT91_UTMI_PLL_CLK_FREQ 480000000
+
 static inline unsigned long get_cpu_clk_rate(void)
 {
        DECLARE_GLOBAL_DATA_PTR;