1 Add refclock and tcxoclock as clock providers in WiLink. These clocks
2 are not accesible outside the WiLink module, but they are registered
3 in the clock framework anyway. Only the WiLink chip consumes these
6 In theory, the WiLink chip could be connected to external clocks
7 instead of using these internal clocks, so make the clock consumer
8 code generic enough. If external clocks are used, then the internal
9 clock device tree nodes are not necessary, but the external ones must
12 Signed-off-by: Luciano Coelho <coelho@ti.com>
13 Reviewed-by: Felipe Balbi <balbi@ti.com>
16 drivers/net/wireless/ti/wlcore/sdio.c | 9 +++++++++
17 1 file changed, 9 insertions(+)
19 --- a/drivers/net/wireless/ti/wlcore/sdio.c
20 +++ b/drivers/net/wireless/ti/wlcore/sdio.c
22 #include <linux/wl12xx.h>
23 #include <linux/pm_runtime.h>
24 #include <linux/printk.h>
25 +#include <linux/clk-provider.h>
28 #include "wl12xx_80211.h"
29 @@ -214,10 +215,15 @@ static struct wl1271_if_operations sdio_
30 .set_block_size = wl1271_sdio_set_block_size,
33 +static const struct of_device_id wlcore_sdio_of_clk_match_table[] = {
34 + { .compatible = "ti,wilink-clock" },
37 static struct wl12xx_platform_data *wlcore_get_pdata_from_of(struct device *dev)
39 struct wl12xx_platform_data *pdata;
40 struct device_node *np = dev->of_node;
41 + struct device_node *clock_node;
44 np = of_find_matching_node(NULL, dev->driver->of_match_table);
45 @@ -241,6 +247,9 @@ static struct wl12xx_platform_data *wlco
49 + for_each_matching_node(clock_node, wlcore_sdio_of_clk_match_table)
50 + of_fixed_clk_setup(clock_node);