mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
clk: at91: rework main clk implementation
AT91 main clk is a clk multiplexer and not a simple fixed rate clk as currently implemented. In some SoCs (sam9x5, sama5, sam9g45 families) this multiplexer can choose among 2 sources: an internal RC oscillator circuit and an oscillator using an external crystal. In other Socs (sam9260, rm9200 families) the multiplexer source is hardcoded to the external crystal oscillator. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
committed by
Nicolas Ferre
parent
cf2e933ce6
commit
27cb1c2083
+525
-74
File diff suppressed because it is too large
Load Diff
@@ -230,10 +230,22 @@ out_free_pmc:
|
||||
|
||||
static const struct of_device_id pmc_clk_ids[] __initconst = {
|
||||
/* Main clock */
|
||||
{
|
||||
.compatible = "atmel,at91rm9200-clk-main-osc",
|
||||
.data = of_at91rm9200_clk_main_osc_setup,
|
||||
},
|
||||
{
|
||||
.compatible = "atmel,at91sam9x5-clk-main-rc-osc",
|
||||
.data = of_at91sam9x5_clk_main_rc_osc_setup,
|
||||
},
|
||||
{
|
||||
.compatible = "atmel,at91rm9200-clk-main",
|
||||
.data = of_at91rm9200_clk_main_setup,
|
||||
},
|
||||
{
|
||||
.compatible = "atmel,at91sam9x5-clk-main",
|
||||
.data = of_at91sam9x5_clk_main_setup,
|
||||
},
|
||||
/* PLL clocks */
|
||||
{
|
||||
.compatible = "atmel,at91rm9200-clk-pll",
|
||||
|
||||
@@ -58,8 +58,14 @@ static inline void pmc_write(struct at91_pmc *pmc, int offset, u32 value)
|
||||
int of_at91_get_clk_range(struct device_node *np, const char *propname,
|
||||
struct clk_range *range);
|
||||
|
||||
extern void __init of_at91rm9200_clk_main_osc_setup(struct device_node *np,
|
||||
struct at91_pmc *pmc);
|
||||
extern void __init of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np,
|
||||
struct at91_pmc *pmc);
|
||||
extern void __init of_at91rm9200_clk_main_setup(struct device_node *np,
|
||||
struct at91_pmc *pmc);
|
||||
extern void __init of_at91sam9x5_clk_main_setup(struct device_node *np,
|
||||
struct at91_pmc *pmc);
|
||||
|
||||
extern void __init of_at91rm9200_clk_pll_setup(struct device_node *np,
|
||||
struct at91_pmc *pmc);
|
||||
|
||||
Reference in New Issue
Block a user