diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 14:54:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 14:54:50 -0400 |
| commit | 92295f632cefbdf15d46e9ac5f0fc3cfade35259 (patch) | |
| tree | 5b3820d4ed135ccbef540781d99a46137959bbb6 /include | |
| parent | 750b2d7b93f2ba19f4f238cc641bda22fe07c155 (diff) | |
| parent | 45e3ec3784aec0d194740b75b547bfabca448ff3 (diff) | |
Merge tag 'clk-for-linus-3.11' of git://git.linaro.org/people/mturquette/linux
Pull clock framework updates from Mike Turquette:
"The common clock framework changes for 3.11 include new clock drivers
across several different platforms and architectures, fixes to
existing drivers, a MAINTAINERS file fix and improvements to the basic
clock types that allow them to be of use to more platforms than before.
Only a few fixes to the core framework are included with most all of
the changes landing in the various clock drivers themselves."
* tag 'clk-for-linus-3.11' of git://git.linaro.org/people/mturquette/linux: (55 commits)
clk: tegra: fix ifdef for tegra_periph_reset_assert inline
clk: tegra: provide tegra_periph_reset_assert alternative
clk: exynos4: Fix clock aliases for cpufreq related clocks
clk: samsung: Add MUX_FA macro to pass flag and alias
clk: add support for Rockchip gate clocks
clk: vexpress: Make the clock drivers directly available for arm64
clk: vexpress: Use full node name to identify individual clocks
clk: tegra: T114: add DFLL DVCO reset control
clk: tegra: T114: add DFLL source clocks
clk: tegra: T114: add FCPU clock shaper programming, needed by the DFLL
clk: gate: add CLK_GATE_HIWORD_MASK
clk: divider: add CLK_DIVIDER_HIWORD_MASK flag
clk: mux: add CLK_MUX_HIWORD_MASK
clk: Always notify whole subtree when reparenting
MAINTAINERS: make drivers/clk entry match subdirs
clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate
clk: use clk_get_rate() for debugfs
clk: tegra: Use override bits when needed
clk: tegra: override bits for Tegra30 PLLM
clk: tegra: override bits for Tegra114 PLLM
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/clk-provider.h | 62 | ||||
| -rw-r--r-- | include/linux/clk/tegra.h | 6 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-sysctrl.h | 4 | ||||
| -rw-r--r-- | include/linux/mfd/dbx500-prcmu.h | 12 | ||||
| -rw-r--r-- | include/linux/platform_data/clk-ux500.h | 6 | ||||
| -rw-r--r-- | include/linux/platform_data/si5351.h | 18 |
6 files changed, 95 insertions, 13 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 11860985fecb..1ec14a732176 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -210,6 +210,10 @@ void of_fixed_clk_setup(struct device_node *np); | |||
| 210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to | 210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to |
| 211 | * enable the clock. Setting this flag does the opposite: setting the bit | 211 | * enable the clock. Setting this flag does the opposite: setting the bit |
| 212 | * disable the clock and clearing it enables the clock | 212 | * disable the clock and clearing it enables the clock |
| 213 | * CLK_GATE_HIWORD_MASK - The gate settings are only in lower 16-bit | ||
| 214 | * of this register, and mask of gate bits are in higher 16-bit of this | ||
| 215 | * register. While setting the gate bits, higher 16-bit should also be | ||
| 216 | * updated to indicate changing gate bits. | ||
| 213 | */ | 217 | */ |
| 214 | struct clk_gate { | 218 | struct clk_gate { |
| 215 | struct clk_hw hw; | 219 | struct clk_hw hw; |
| @@ -220,6 +224,7 @@ struct clk_gate { | |||
| 220 | }; | 224 | }; |
| 221 | 225 | ||
| 222 | #define CLK_GATE_SET_TO_DISABLE BIT(0) | 226 | #define CLK_GATE_SET_TO_DISABLE BIT(0) |
| 227 | #define CLK_GATE_HIWORD_MASK BIT(1) | ||
| 223 | 228 | ||
| 224 | extern const struct clk_ops clk_gate_ops; | 229 | extern const struct clk_ops clk_gate_ops; |
| 225 | struct clk *clk_register_gate(struct device *dev, const char *name, | 230 | struct clk *clk_register_gate(struct device *dev, const char *name, |
| @@ -257,6 +262,10 @@ struct clk_div_table { | |||
| 257 | * Some hardware implementations gracefully handle this case and allow a | 262 | * Some hardware implementations gracefully handle this case and allow a |
| 258 | * zero divisor by not modifying their input clock | 263 | * zero divisor by not modifying their input clock |
| 259 | * (divide by one / bypass). | 264 | * (divide by one / bypass). |
| 265 | * CLK_DIVIDER_HIWORD_MASK - The divider settings are only in lower 16-bit | ||
| 266 | * of this register, and mask of divider bits are in higher 16-bit of this | ||
| 267 | * register. While setting the divider bits, higher 16-bit should also be | ||
| 268 | * updated to indicate changing divider bits. | ||
| 260 | */ | 269 | */ |
| 261 | struct clk_divider { | 270 | struct clk_divider { |
| 262 | struct clk_hw hw; | 271 | struct clk_hw hw; |
| @@ -271,6 +280,7 @@ struct clk_divider { | |||
| 271 | #define CLK_DIVIDER_ONE_BASED BIT(0) | 280 | #define CLK_DIVIDER_ONE_BASED BIT(0) |
| 272 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) | 281 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) |
| 273 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) | 282 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) |
| 283 | #define CLK_DIVIDER_HIWORD_MASK BIT(3) | ||
| 274 | 284 | ||
| 275 | extern const struct clk_ops clk_divider_ops; | 285 | extern const struct clk_ops clk_divider_ops; |
| 276 | struct clk *clk_register_divider(struct device *dev, const char *name, | 286 | struct clk *clk_register_divider(struct device *dev, const char *name, |
| @@ -299,6 +309,10 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
| 299 | * Flags: | 309 | * Flags: |
| 300 | * CLK_MUX_INDEX_ONE - register index starts at 1, not 0 | 310 | * CLK_MUX_INDEX_ONE - register index starts at 1, not 0 |
| 301 | * CLK_MUX_INDEX_BIT - register index is a single bit (power of two) | 311 | * CLK_MUX_INDEX_BIT - register index is a single bit (power of two) |
| 312 | * CLK_MUX_HIWORD_MASK - The mux settings are only in lower 16-bit of this | ||
| 313 | * register, and mask of mux bits are in higher 16-bit of this register. | ||
| 314 | * While setting the mux bits, higher 16-bit should also be updated to | ||
| 315 | * indicate changing mux bits. | ||
| 302 | */ | 316 | */ |
| 303 | struct clk_mux { | 317 | struct clk_mux { |
| 304 | struct clk_hw hw; | 318 | struct clk_hw hw; |
| @@ -312,6 +326,7 @@ struct clk_mux { | |||
| 312 | 326 | ||
| 313 | #define CLK_MUX_INDEX_ONE BIT(0) | 327 | #define CLK_MUX_INDEX_ONE BIT(0) |
| 314 | #define CLK_MUX_INDEX_BIT BIT(1) | 328 | #define CLK_MUX_INDEX_BIT BIT(1) |
| 329 | #define CLK_MUX_HIWORD_MASK BIT(2) | ||
| 315 | 330 | ||
| 316 | extern const struct clk_ops clk_mux_ops; | 331 | extern const struct clk_ops clk_mux_ops; |
| 317 | 332 | ||
| @@ -423,6 +438,17 @@ struct of_device_id; | |||
| 423 | 438 | ||
| 424 | typedef void (*of_clk_init_cb_t)(struct device_node *); | 439 | typedef void (*of_clk_init_cb_t)(struct device_node *); |
| 425 | 440 | ||
| 441 | struct clk_onecell_data { | ||
| 442 | struct clk **clks; | ||
| 443 | unsigned int clk_num; | ||
| 444 | }; | ||
| 445 | |||
| 446 | #define CLK_OF_DECLARE(name, compat, fn) \ | ||
| 447 | static const struct of_device_id __clk_of_table_##name \ | ||
| 448 | __used __section(__clk_of_table) \ | ||
| 449 | = { .compatible = compat, .data = fn }; | ||
| 450 | |||
| 451 | #ifdef CONFIG_OF | ||
| 426 | int of_clk_add_provider(struct device_node *np, | 452 | int of_clk_add_provider(struct device_node *np, |
| 427 | struct clk *(*clk_src_get)(struct of_phandle_args *args, | 453 | struct clk *(*clk_src_get)(struct of_phandle_args *args, |
| 428 | void *data), | 454 | void *data), |
| @@ -430,19 +456,39 @@ int of_clk_add_provider(struct device_node *np, | |||
| 430 | void of_clk_del_provider(struct device_node *np); | 456 | void of_clk_del_provider(struct device_node *np); |
| 431 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | 457 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, |
| 432 | void *data); | 458 | void *data); |
| 433 | struct clk_onecell_data { | ||
| 434 | struct clk **clks; | ||
| 435 | unsigned int clk_num; | ||
| 436 | }; | ||
| 437 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | 459 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); |
| 438 | const char *of_clk_get_parent_name(struct device_node *np, int index); | 460 | const char *of_clk_get_parent_name(struct device_node *np, int index); |
| 439 | 461 | ||
| 440 | void of_clk_init(const struct of_device_id *matches); | 462 | void of_clk_init(const struct of_device_id *matches); |
| 441 | 463 | ||
| 442 | #define CLK_OF_DECLARE(name, compat, fn) \ | 464 | #else /* !CONFIG_OF */ |
| 443 | static const struct of_device_id __clk_of_table_##name \ | ||
| 444 | __used __section(__clk_of_table) \ | ||
| 445 | = { .compatible = compat, .data = fn }; | ||
| 446 | 465 | ||
| 466 | static inline int of_clk_add_provider(struct device_node *np, | ||
| 467 | struct clk *(*clk_src_get)(struct of_phandle_args *args, | ||
| 468 | void *data), | ||
| 469 | void *data) | ||
| 470 | { | ||
| 471 | return 0; | ||
| 472 | } | ||
| 473 | #define of_clk_del_provider(np) \ | ||
| 474 | { while (0); } | ||
| 475 | static inline struct clk *of_clk_src_simple_get( | ||
| 476 | struct of_phandle_args *clkspec, void *data) | ||
| 477 | { | ||
| 478 | return ERR_PTR(-ENOENT); | ||
| 479 | } | ||
| 480 | static inline struct clk *of_clk_src_onecell_get( | ||
| 481 | struct of_phandle_args *clkspec, void *data) | ||
| 482 | { | ||
| 483 | return ERR_PTR(-ENOENT); | ||
| 484 | } | ||
| 485 | static inline const char *of_clk_get_parent_name(struct device_node *np, | ||
| 486 | int index) | ||
| 487 | { | ||
| 488 | return NULL; | ||
| 489 | } | ||
| 490 | #define of_clk_init(matches) \ | ||
| 491 | { while (0); } | ||
| 492 | #endif /* CONFIG_OF */ | ||
| 447 | #endif /* CONFIG_COMMON_CLK */ | 493 | #endif /* CONFIG_COMMON_CLK */ |
| 448 | #endif /* CLK_PROVIDER_H */ | 494 | #endif /* CLK_PROVIDER_H */ |
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h index 642789baec74..23a0ceee831f 100644 --- a/include/linux/clk/tegra.h +++ b/include/linux/clk/tegra.h | |||
| @@ -120,9 +120,13 @@ static inline void tegra_cpu_clock_resume(void) | |||
| 120 | } | 120 | } |
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
| 123 | #ifdef CONFIG_ARCH_TEGRA | ||
| 123 | void tegra_periph_reset_deassert(struct clk *c); | 124 | void tegra_periph_reset_deassert(struct clk *c); |
| 124 | void tegra_periph_reset_assert(struct clk *c); | 125 | void tegra_periph_reset_assert(struct clk *c); |
| 125 | void tegra_clocks_init(void); | 126 | #else |
| 127 | static inline void tegra_periph_reset_deassert(struct clk *c) {} | ||
| 128 | static inline void tegra_periph_reset_assert(struct clk *c) {} | ||
| 129 | #endif | ||
| 126 | void tegra_clocks_apply_init_table(void); | 130 | void tegra_clocks_apply_init_table(void); |
| 127 | 131 | ||
| 128 | #endif /* __LINUX_CLK_TEGRA_H_ */ | 132 | #endif /* __LINUX_CLK_TEGRA_H_ */ |
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h index 990bc93f46e1..adba89d9c660 100644 --- a/include/linux/mfd/abx500/ab8500-sysctrl.h +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
| @@ -278,8 +278,8 @@ struct ab8500_sysctrl_platform_data { | |||
| 278 | 278 | ||
| 279 | #define AB9540_SYSCLK12CONFCTRL_PLL26TO38ENA BIT(0) | 279 | #define AB9540_SYSCLK12CONFCTRL_PLL26TO38ENA BIT(0) |
| 280 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12USBMUXSEL BIT(1) | 280 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12USBMUXSEL BIT(1) |
| 281 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL_MASK 0x0C | 281 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL0 BIT(2) |
| 282 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL_SHIFT 2 | 282 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL1 BIT(3) |
| 283 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12BUFMUX BIT(4) | 283 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12BUFMUX BIT(4) |
| 284 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12PLLMUX BIT(5) | 284 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12PLLMUX BIT(5) |
| 285 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK2MUXVALID BIT(6) | 285 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK2MUXVALID BIT(6) |
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 689e6a0d9c99..ca0790fba2f5 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
| @@ -134,6 +134,11 @@ enum prcmu_clock { | |||
| 134 | PRCMU_SIACLK, | 134 | PRCMU_SIACLK, |
| 135 | PRCMU_SVACLK, | 135 | PRCMU_SVACLK, |
| 136 | PRCMU_ACLK, | 136 | PRCMU_ACLK, |
| 137 | PRCMU_HVACLK, /* Ux540 only */ | ||
| 138 | PRCMU_G1CLK, /* Ux540 only */ | ||
| 139 | PRCMU_SDMMCHCLK, | ||
| 140 | PRCMU_CAMCLK, | ||
| 141 | PRCMU_BML8580CLK, | ||
| 137 | PRCMU_NUM_REG_CLOCKS, | 142 | PRCMU_NUM_REG_CLOCKS, |
| 138 | PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, | 143 | PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, |
| 139 | PRCMU_CDCLK, | 144 | PRCMU_CDCLK, |
| @@ -148,6 +153,13 @@ enum prcmu_clock { | |||
| 148 | PRCMU_DSI0ESCCLK, | 153 | PRCMU_DSI0ESCCLK, |
| 149 | PRCMU_DSI1ESCCLK, | 154 | PRCMU_DSI1ESCCLK, |
| 150 | PRCMU_DSI2ESCCLK, | 155 | PRCMU_DSI2ESCCLK, |
| 156 | /* LCD DSI PLL - Ux540 only */ | ||
| 157 | PRCMU_PLLDSI_LCD, | ||
| 158 | PRCMU_DSI0CLK_LCD, | ||
| 159 | PRCMU_DSI1CLK_LCD, | ||
| 160 | PRCMU_DSI0ESCCLK_LCD, | ||
| 161 | PRCMU_DSI1ESCCLK_LCD, | ||
| 162 | PRCMU_DSI2ESCCLK_LCD, | ||
| 151 | }; | 163 | }; |
| 152 | 164 | ||
| 153 | /** | 165 | /** |
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h index 320d9c39ea0a..9d98f3aaa16c 100644 --- a/include/linux/platform_data/clk-ux500.h +++ b/include/linux/platform_data/clk-ux500.h | |||
| @@ -12,7 +12,9 @@ | |||
| 12 | 12 | ||
| 13 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, | 13 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
| 14 | u32 clkrst5_base, u32 clkrst6_base); | 14 | u32 clkrst5_base, u32 clkrst6_base); |
| 15 | void u9540_clk_init(void); | 15 | void u9540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
| 16 | void u8540_clk_init(void); | 16 | u32 clkrst5_base, u32 clkrst6_base); |
| 17 | void u8540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, | ||
| 18 | u32 clkrst5_base, u32 clkrst6_base); | ||
| 17 | 19 | ||
| 18 | #endif /* __CLK_UX500_H */ | 20 | #endif /* __CLK_UX500_H */ |
diff --git a/include/linux/platform_data/si5351.h b/include/linux/platform_data/si5351.h index 92dabcaf6499..54334393ab92 100644 --- a/include/linux/platform_data/si5351.h +++ b/include/linux/platform_data/si5351.h | |||
| @@ -79,6 +79,23 @@ enum si5351_drive_strength { | |||
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | /** | 81 | /** |
| 82 | * enum si5351_disable_state - Si5351 clock output disable state | ||
| 83 | * @SI5351_DISABLE_DEFAULT: default, do not change eeprom config | ||
| 84 | * @SI5351_DISABLE_LOW: CLKx is set to a LOW state when disabled | ||
| 85 | * @SI5351_DISABLE_HIGH: CLKx is set to a HIGH state when disabled | ||
| 86 | * @SI5351_DISABLE_FLOATING: CLKx is set to a FLOATING state when | ||
| 87 | * disabled | ||
| 88 | * @SI5351_DISABLE_NEVER: CLKx is NEVER disabled | ||
| 89 | */ | ||
| 90 | enum si5351_disable_state { | ||
| 91 | SI5351_DISABLE_DEFAULT = 0, | ||
| 92 | SI5351_DISABLE_LOW, | ||
| 93 | SI5351_DISABLE_HIGH, | ||
| 94 | SI5351_DISABLE_FLOATING, | ||
| 95 | SI5351_DISABLE_NEVER, | ||
| 96 | }; | ||
| 97 | |||
| 98 | /** | ||
| 82 | * struct si5351_clkout_config - Si5351 clock output configuration | 99 | * struct si5351_clkout_config - Si5351 clock output configuration |
| 83 | * @clkout: clkout number | 100 | * @clkout: clkout number |
| 84 | * @multisynth_src: multisynth source clock | 101 | * @multisynth_src: multisynth source clock |
| @@ -91,6 +108,7 @@ struct si5351_clkout_config { | |||
| 91 | enum si5351_multisynth_src multisynth_src; | 108 | enum si5351_multisynth_src multisynth_src; |
| 92 | enum si5351_clkout_src clkout_src; | 109 | enum si5351_clkout_src clkout_src; |
| 93 | enum si5351_drive_strength drive; | 110 | enum si5351_drive_strength drive; |
| 111 | enum si5351_disable_state disable_state; | ||
| 94 | bool pll_master; | 112 | bool pll_master; |
| 95 | unsigned long rate; | 113 | unsigned long rate; |
| 96 | }; | 114 | }; |
