summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2019-02-24 19:52:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-25 09:46:48 +0100
commitaf5383ee87e0087ea17e8921a9604b51a31c6fb8 (patch)
tree674b0f6c617f2d9923fd771eebdde5b1cb53b3b3 /include/linux
parenta937f01db475f4e4e174668f4dfcf2ee52e0031a (diff)
downloadbarebox-af5383ee87e0087ea17e8921a9604b51a31c6fb8.tar.gz
barebox-af5383ee87e0087ea17e8921a9604b51a31c6fb8.tar.xz
clk: at91: update to PMC bindings
Based on kernel 5.0-rc6 update at91 clk support to match the new PMC bindings. Manually added all changes done in the kernel from 4.9-rc3 to 5.0-rc6. New drivers required was added as seperate commits. This includes dt-compat code required to support at91sam5d3, as this is not yet ported to use the new PMC bindings. clk-programmable saw some extra changes - it had never been bulit. It is used only by at91sama5d2 - and barebox has no board support for this cpu (yet). The CONFIG_SOC symbols is used to select the relevant drivers. CONFIG_SOC_SAM9 selects several drivers, and in the future this can be split to keep the image size down. In the kernel CLK_OF_DECLARE_DRIVER() can be used for a two step init. In barebox this is a simple one step init. It was added to have less differences between the kernel and the barebox versions of the drivers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 978a0a8a9a..20498574f8 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -385,6 +385,11 @@ int of_clk_add_provider(struct device_node *np,
struct clk *(*clk_src_get)(struct of_phandle_args *args,
void *data),
void *data);
+
+static inline unsigned int clk_get_num_parents(const struct clk *hw)
+{
+ return hw->num_parents;
+}
#else
@@ -430,6 +435,8 @@ static inline int of_clk_add_provider(struct device_node *np,
}
#endif
+#define CLK_OF_DECLARE_DRIVER(name, compat, fn) CLK_OF_DECLARE(name, compat, fn)
+
struct string_list;
int clk_name_complete(struct string_list *sl, char *instr);