ARM: at91: clock: complete the GCK's clock sources
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>
This commit is contained in:
parent
4adf6a7157
commit
7a91e1a383
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user