[PATCH v3 4/8] clk: Add clock driver for mb86s7x
From: Jassi Brar <hidden>
Date: 2015-01-09 13:03:54
Also in:
linux-devicetree
On 9 January 2015 at 18:09, Russell King - ARM Linux [off-list ref] wrote:
On Fri, Jan 09, 2015 at 07:29:37PM +0800, Vincent Yang wrote:quoted
+static int mb86s7x_clclk_of_init(void) +{ + int cpu; + struct clk *clk; + + for_each_possible_cpu(cpu) { + struct device *cpu_dev = get_cpu_device(cpu); + + if (!cpu_dev) { + pr_err("failed to get cpu%d device\n", cpu); + continue; + } + + clk = mb86s7x_clclk_register(cpu_dev); + if (IS_ERR(clk)) { + pr_err("failed to register cpu%d clock\n", cpu); + continue; + } + if (clk_register_clkdev(clk, NULL, dev_name(cpu_dev))) { + pr_err("failed to register cpu%d clock lookup\n", cpu); + continue; + } + pr_debug("registered clk for %s\n", dev_name(cpu_dev)); + } + + platform_device_register_simple("arm-bL-cpufreq-dt", -1, NULL, 0); + + return 0; +} +module_init(mb86s7x_clclk_of_init);What is the effect of this initialising on platforms which are not a "mb86s7x" ?
Yeah, there should have been some check for node "fujitsu,mb86s70-scb-1.0" that guarantees we have a remote+protocol that this driver assumes. Thanks Jassi