aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-09 15:06:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-09 15:06:24 -0400
commit6419945e3313fd894af79caefca6823d4511133f (patch)
treef6bc2ac4f5820f4bfada3a9e9abc7e52a8ea69cb /include/linux
parentd60dafdca4b463405e5586df923f05b10e9ac2f9 (diff)
parent55913c2d33307ac11797531ebbe7c122a73cc0fd (diff)
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk updates from Stephen Boyd: "This time we have a good set of changes to the core framework that do some general cleanups, but nothing too major. The majority of the diff goes to two SoCs, Actions Semi and Qualcomm. A brand new driver is introduced for Actions Semi so it takes up some lines to add all the different types, and the Qualcomm diff is there because we add support for two SoCs and it's quite a bit of data. Otherwise the big driver updates are on TI Davinci and Amlogic platforms. And then the long tail of driver updates for various fixes and stuff follows after that. Core: - debugfs cleanups removing error checking and an unused provider API - Removal of a clk init typedef that isn't used - Usage of match_string() to simplify parent string name matching - OF clk helpers moved to their own file (linux/of_clk.h) - Make clk warnings more readable across kernel versions New Drivers: - Qualcomm SDM845 GCC and Video clk controllers - Qualcomm MSM8998 GCC - Actions Semi S900 SoC support - Nuvoton npcm750 microcontroller clks - Amlogic axg AO clock controller Removed Drivers: - Deprecated Rockchip clk-gate driver Updates: - debugfs functions stopped checking return values - Support for the MSIOF module clocks on Rensas R-Car M3-N - Support for the new Rensas RZ/G1C and R-Car E3 SoCs - Qualcomm GDSC, RCG, and PLL updates for clk changes in new SoCs - Berlin and Amlogic SPDX tagging - Usage of of_clk_get_parent_count() in more places - Proper implementation of the CDEV1/2 clocks on Tegra20 - Allwinner H6 PRCM clock support and R40 EMAC support - Add critical flag to meson8b's fdiv2 as temporary fixup for ethernet - Round closest support for meson's mpll driver - Support for meson8b nand clocks and gxbb video decoder clocks - Mediatek mali clks - STM32MP1 fixes - Uniphier LD11/LD20 stream demux system clock" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (134 commits) clk: qcom: Export clk_fabia_pll_configure() clk: bcm: Update and add Stingray clock entries dt-bindings: clk: Update Stingray binding doc clk-si544: Properly round requested frequency to nearest match clk: ingenic: jz4770: Add 150us delay after enabling VPU clock clk: ingenic: jz4770: Enable power of AHB1 bus after ungating VPU clock clk: ingenic: jz4770: Modify C1CLK clock to disable CPU clock stop on idle clk: ingenic: jz4770: Change OTG from custom to standard gated clock clk: ingenic: Support specifying "wait for clock stable" delay clk: ingenic: Add support for clocks whose gate bit is inverted clk: use match_string() helper clk: bcm2835: use match_string() helper clk: Return void from debug_init op clk: remove clk_debugfs_add_file() clk: tegra: no need to check return value of debugfs_create functions clk: davinci: no need to check return value of debugfs_create functions clk: bcm2835: no need to check return value of debugfs_create functions clk: no need to check return value of debugfs_create functions clk: imx6: add EPIT clock support clk: mvebu: use correct bit for 98DX3236 NAND ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-provider.h23
-rw-r--r--include/linux/clk/davinci.h40
-rw-r--r--include/linux/of_clk.h30
3 files changed, 72 insertions, 21 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 1d25e149c1c5..b7cfa037e593 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -13,6 +13,7 @@
13 13
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_clk.h>
16 17
17#ifdef CONFIG_COMMON_CLK 18#ifdef CONFIG_COMMON_CLK
18 19
@@ -218,7 +219,7 @@ struct clk_ops {
218 int (*get_phase)(struct clk_hw *hw); 219 int (*get_phase)(struct clk_hw *hw);
219 int (*set_phase)(struct clk_hw *hw, int degrees); 220 int (*set_phase)(struct clk_hw *hw, int degrees);
220 void (*init)(struct clk_hw *hw); 221 void (*init)(struct clk_hw *hw);
221 int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); 222 void (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
222}; 223};
223 224
224/** 225/**
@@ -805,8 +806,6 @@ unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate);
805 806
806struct of_device_id; 807struct of_device_id;
807 808
808typedef void (*of_clk_init_cb_t)(struct device_node *);
809
810struct clk_onecell_data { 809struct clk_onecell_data {
811 struct clk **clks; 810 struct clk **clks;
812 unsigned int clk_num; 811 unsigned int clk_num;
@@ -893,13 +892,10 @@ struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec,
893struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); 892struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
894struct clk_hw *of_clk_hw_onecell_get(struct of_phandle_args *clkspec, 893struct clk_hw *of_clk_hw_onecell_get(struct of_phandle_args *clkspec,
895 void *data); 894 void *data);
896unsigned int of_clk_get_parent_count(struct device_node *np);
897int of_clk_parent_fill(struct device_node *np, const char **parents, 895int of_clk_parent_fill(struct device_node *np, const char **parents,
898 unsigned int size); 896 unsigned int size);
899const char *of_clk_get_parent_name(struct device_node *np, int index);
900int of_clk_detect_critical(struct device_node *np, int index, 897int of_clk_detect_critical(struct device_node *np, int index,
901 unsigned long *flags); 898 unsigned long *flags);
902void of_clk_init(const struct of_device_id *matches);
903 899
904#else /* !CONFIG_OF */ 900#else /* !CONFIG_OF */
905 901
@@ -946,26 +942,16 @@ of_clk_hw_onecell_get(struct of_phandle_args *clkspec, void *data)
946{ 942{
947 return ERR_PTR(-ENOENT); 943 return ERR_PTR(-ENOENT);
948} 944}
949static inline unsigned int of_clk_get_parent_count(struct device_node *np)
950{
951 return 0;
952}
953static inline int of_clk_parent_fill(struct device_node *np, 945static inline int of_clk_parent_fill(struct device_node *np,
954 const char **parents, unsigned int size) 946 const char **parents, unsigned int size)
955{ 947{
956 return 0; 948 return 0;
957} 949}
958static inline const char *of_clk_get_parent_name(struct device_node *np,
959 int index)
960{
961 return NULL;
962}
963static inline int of_clk_detect_critical(struct device_node *np, int index, 950static inline int of_clk_detect_critical(struct device_node *np, int index,
964 unsigned long *flags) 951 unsigned long *flags)
965{ 952{
966 return 0; 953 return 0;
967} 954}
968static inline void of_clk_init(const struct of_device_id *matches) {}
969#endif /* CONFIG_OF */ 955#endif /* CONFIG_OF */
970 956
971/* 957/*
@@ -999,10 +985,5 @@ static inline void clk_writel(u32 val, u32 __iomem *reg)
999 985
1000#endif /* platform dependent I/O accessors */ 986#endif /* platform dependent I/O accessors */
1001 987
1002#ifdef CONFIG_DEBUG_FS
1003struct dentry *clk_debugfs_add_file(struct clk_hw *hw, char *name, umode_t mode,
1004 void *data, const struct file_operations *fops);
1005#endif
1006
1007#endif /* CONFIG_COMMON_CLK */ 988#endif /* CONFIG_COMMON_CLK */
1008#endif /* CLK_PROVIDER_H */ 989#endif /* CLK_PROVIDER_H */
diff --git a/include/linux/clk/davinci.h b/include/linux/clk/davinci.h
new file mode 100644
index 000000000000..8a7b5cd7eac0
--- /dev/null
+++ b/include/linux/clk/davinci.h
@@ -0,0 +1,40 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Clock drivers for TI DaVinci PLL and PSC controllers
4 *
5 * Copyright (C) 2018 David Lechner <david@lechnology.com>
6 */
7
8#ifndef __LINUX_CLK_DAVINCI_PLL_H___
9#define __LINUX_CLK_DAVINCI_PLL_H___
10
11#include <linux/device.h>
12#include <linux/regmap.h>
13
14/* function for registering clocks in early boot */
15
16#ifdef CONFIG_ARCH_DAVINCI_DA830
17int da830_pll_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
18#endif
19#ifdef CONFIG_ARCH_DAVINCI_DA850
20int da850_pll0_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
21#endif
22#ifdef CONFIG_ARCH_DAVINCI_DM355
23int dm355_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
24int dm355_psc_init(struct device *dev, void __iomem *base);
25#endif
26#ifdef CONFIG_ARCH_DAVINCI_DM365
27int dm365_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
28int dm365_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
29int dm365_psc_init(struct device *dev, void __iomem *base);
30#endif
31#ifdef CONFIG_ARCH_DAVINCI_DM644x
32int dm644x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
33int dm644x_psc_init(struct device *dev, void __iomem *base);
34#endif
35#ifdef CONFIG_ARCH_DAVINCI_DM646x
36int dm646x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
37int dm646x_psc_init(struct device *dev, void __iomem *base);
38#endif
39
40#endif /* __LINUX_CLK_DAVINCI_PLL_H___ */
diff --git a/include/linux/of_clk.h b/include/linux/of_clk.h
new file mode 100644
index 000000000000..b27da9f164cb
--- /dev/null
+++ b/include/linux/of_clk.h
@@ -0,0 +1,30 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * OF clock helpers
4 */
5
6#ifndef __LINUX_OF_CLK_H
7#define __LINUX_OF_CLK_H
8
9#if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF)
10
11unsigned int of_clk_get_parent_count(struct device_node *np);
12const char *of_clk_get_parent_name(struct device_node *np, int index);
13void of_clk_init(const struct of_device_id *matches);
14
15#else /* !CONFIG_COMMON_CLK || !CONFIG_OF */
16
17static inline unsigned int of_clk_get_parent_count(struct device_node *np)
18{
19 return 0;
20}
21static inline const char *of_clk_get_parent_name(struct device_node *np,
22 int index)
23{
24 return NULL;
25}
26static inline void of_clk_init(const struct of_device_id *matches) {}
27
28#endif /* !CONFIG_COMMON_CLK || !CONFIG_OF */
29
30#endif /* __LINUX_OF_CLK_H */