提交 c0b868c0 编写于 作者: W Wenyou Yang 提交者: Andreas Bießmann

ARM: at91: clock: add PMC_PLLICPR init function

To avoid the duplicated code, add the PMC_PLLICPR init function.
Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com>
Tested-by: NHeiko Schocher <hs@denx.de>
Reviewed-by: NAndreas Bießmann <andreas.devel@googlemail.com>
上级 30f65c85
......@@ -112,3 +112,10 @@ void at91_usb_clk_init(u32 value)
writel(value, &pmc->usb);
}
void at91_pllicpr_init(u32 icpr)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
writel(icpr, &pmc->pllicpr);
}
......@@ -246,4 +246,11 @@ typedef struct at91_pmc {
#define AT91_PMC_GCKRDY (1 << 24)
#define AT91_PMC_PROTKEY 0x504d4301 /* Activation Code */
/* PLL Charge Pump Current Register (PMC_PLLICPR) */
#define AT91_PMC_ICP_PLLA(x) (((x) & 0x3) << 0)
#define AT91_PMC_IPLL_PLLA(x) (((x) & 0x7) << 8)
#define AT91_PMC_ICP_PLLU(x) (((x) & 0x3) << 16)
#define AT91_PMC_IVCO_PLLU(x) (((x) & 0x3) << 24)
#endif
......@@ -135,5 +135,6 @@ int at91_upll_clk_disable(void);
void at91_usb_clk_init(u32 value);
int at91_pllb_clk_enable(u32 pllbr);
int at91_pllb_clk_disable(void);
void at91_pllicpr_init(u32 icpr);
#endif /* __ASM_ARM_ARCH_CLK_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册