Skip to content

Commit

Permalink
clk: bcm2835: probe for fixed-clock in device tree
Browse files Browse the repository at this point in the history
This will allow fixed-clocks to be registered in device tree, which in
turn will allow clock clients to look up their clocks in device tree.
The first driver to use this feature will be the bcm2835 SDHCI/MMC
driver. In the long run, it is likely these fixed clocks will be
replaced with an actual clock implementation which speaks to the
VideoCore processor, but this change should be transparent to clock
consumers.

Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
  • Loading branch information
Stephen Warren committed Jan 15, 2013
1 parent 9931fac commit 526d239
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/clk/clk-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/clk/bcm2835.h>
#include <linux/clk-provider.h>
#include <linux/of.h>

static const __initconst struct of_device_id clk_match[] = {
{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
{ }
};

/*
* These are fixed clocks. They're probably not all root clocks and it may
Expand Down Expand Up @@ -56,4 +63,6 @@ void __init bcm2835_init_clocks(void)
ret = clk_register_clkdev(clk, NULL, "20215000.uart");
if (ret)
pr_err("uart1_pclk alias not registered\n");

of_clk_init(clk_match);
}

0 comments on commit 526d239

Please sign in to comment.