diff options
author | Remi Pommarel <repk@triplefau.lt> | 2015-12-06 19:22:48 +0300 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-12-25 07:38:38 +0300 |
commit | cfbab8fbab9c330aca963095a439c451ac97c0dd (patch) | |
tree | 27c6b1facf2ff88bb04f250d78c2acdf47ec411f /drivers/clk | |
parent | 6d18b8adbe679b5947aa822b676efff230acc5f6 (diff) | |
download | linux-cfbab8fbab9c330aca963095a439c451ac97c0dd.tar.xz |
clk: bcm2835: Add PWM clock support
Register the pwm clock for bcm2835.
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/bcm/clk-bcm2835.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 6e4dd6fa3403..015e687ffabe 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -807,6 +807,16 @@ static const struct bcm2835_clock_data bcm2835_clock_emmc_data = { .frac_bits = 8, }; +static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { + .name = "pwm", + .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), + .parents = bcm2835_clock_per_parents, + .ctl_reg = CM_PWMCTL, + .div_reg = CM_PWMDIV, + .int_bits = 12, + .frac_bits = 12, +}; + struct bcm2835_pll { struct clk_hw hw; struct bcm2835_cprman *cprman; @@ -1584,6 +1594,9 @@ static int bcm2835_clk_probe(struct platform_device *pdev) cprman->regs + CM_PERIICTL, CM_GATE_BIT, 0, &cprman->regs_lock); + clks[BCM2835_CLOCK_PWM] = + bcm2835_register_clock(cprman, &bcm2835_clock_pwm_data); + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, &cprman->onecell); } |