Skip to content

Commit

Permalink
clk: ux500: Add Device Tree support for the TWD clock
Browse files Browse the repository at this point in the history
This patch enables the TWD fixed factor clock to be specified from
Device Tree via phandles to the "smp-twd-clock" node.

Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Lee Jones authored and Linus Walleij committed Sep 26, 2013
1 parent d625a73 commit 4e33466
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/clk/ux500/u8500_of_clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
struct device_node *np = NULL;
struct device_node *child = NULL;
const char *sgaclk_parent = NULL;
struct clk *clk, *rtc_clk;
struct clk *clk, *rtc_clk, *twd_clk;

if (of_have_populated_dt())
np = of_find_matching_node(NULL, u8500_clk_of_match);
Expand Down Expand Up @@ -234,7 +234,7 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
clk = clk_reg_prcmu_scalable_rate("armss", NULL,
PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED);

clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
twd_clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
CLK_IGNORE_UNUSED, 1, 2);

/*
Expand Down Expand Up @@ -551,5 +551,8 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,

if (!of_node_cmp(child->name, "rtc32k-clock"))
of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk);

if (!of_node_cmp(child->name, "smp-twd-clock"))
of_clk_add_provider(child, of_clk_src_simple_get, twd_clk);
}
}

0 comments on commit 4e33466

Please sign in to comment.