diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 14:25:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 14:25:08 -0500 |
commit | 93874681aa3f538a2b9d59a6c5b7c0e882a36978 (patch) | |
tree | 6ec88fb9fb50e2b5e15b008e7353cc7d6395e1f8 /include | |
parent | 505cbedab9c7c565957e64af6348e5d84acd510e (diff) | |
parent | 8f87189653d60656e262060665f52c855508a301 (diff) |
Merge tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux
Pull clock framework changes from Mike Turquette:
"The common clock framework changes for 3.8 are comprised of lots of
fixes for existing platforms as well as new ports for some ARM
platforms. In addition there are new clk drivers for audio devices
and MFDs."
Fix up trivial conflict in <linux/clk-provider.h> (removal of 'inline'
clashing with return type fixes)
* tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux: (51 commits)
MAINTAINERS: bad email address for Mike Turquette
clk: introduce optional disable_unused callback
clk: ux500: fix bit error
clk: clock multiplexers may register out of order
clk: ux500: Initial support for abx500 clock driver
CLK: SPEAr: Remove unused dummy apb_pclk
CLK: SPEAr: Correct index scanning done for clock synths
CLK: SPEAr: Update clock rate table
CLK: SPEAr: Add missing clocks
CLK: SPEAr: Set CLK_SET_RATE_PARENT for few clocks
CLK: SPEAr13xx: fix parent names of multiple clocks
CLK: SPEAr13xx: Fix mux clock names
CLK: SPEAr: Fix dev_id & con_id for multiple clocks
clk: move IM-PD1 clocks to drivers/clk
clk: make ICST driver handle the VCO registers
clk: add GPLv2 headers to the Versatile clock files
clk: mxs: Use a better name for the USB PHY clock
clk: spear: Add stub functions for spear3[0|1|2]0_clk_init()
CLK: clk-twl6040: fix return value check in twl6040_clk_probe()
clk: ux500: Register nomadik keypad clock lookups for u8500
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clk-provider.h | 24 | ||||
-rw-r--r-- | include/linux/mfd/db8500-prcmu.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/dbx500-prcmu.h | 10 | ||||
-rw-r--r-- | include/linux/platform_data/clk-integrator.h | 2 |
4 files changed, 32 insertions, 8 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index f9f5e9eeb9dd..4989b8a7bed1 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -53,9 +53,18 @@ struct clk_hw; | |||
53 | * @disable: Disable the clock atomically. Called with enable_lock held. | 53 | * @disable: Disable the clock atomically. Called with enable_lock held. |
54 | * This function must not sleep. | 54 | * This function must not sleep. |
55 | * | 55 | * |
56 | * @recalc_rate Recalculate the rate of this clock, by quering hardware. The | 56 | * @is_enabled: Queries the hardware to determine if the clock is enabled. |
57 | * This function must not sleep. Optional, if this op is not | ||
58 | * set then the enable count will be used. | ||
59 | * | ||
60 | * @disable_unused: Disable the clock atomically. Only called from | ||
61 | * clk_disable_unused for gate clocks with special needs. | ||
62 | * Called with enable_lock held. This function must not | ||
63 | * sleep. | ||
64 | * | ||
65 | * @recalc_rate Recalculate the rate of this clock, by querying hardware. The | ||
57 | * parent rate is an input parameter. It is up to the caller to | 66 | * parent rate is an input parameter. It is up to the caller to |
58 | * insure that the prepare_mutex is held across this call. | 67 | * ensure that the prepare_mutex is held across this call. |
59 | * Returns the calculated rate. Optional, but recommended - if | 68 | * Returns the calculated rate. Optional, but recommended - if |
60 | * this op is not set then clock rate will be initialized to 0. | 69 | * this op is not set then clock rate will be initialized to 0. |
61 | * | 70 | * |
@@ -89,7 +98,7 @@ struct clk_hw; | |||
89 | * implementations to split any work between atomic (enable) and sleepable | 98 | * implementations to split any work between atomic (enable) and sleepable |
90 | * (prepare) contexts. If enabling a clock requires code that might sleep, | 99 | * (prepare) contexts. If enabling a clock requires code that might sleep, |
91 | * this must be done in clk_prepare. Clock enable code that will never be | 100 | * this must be done in clk_prepare. Clock enable code that will never be |
92 | * called in a sleepable context may be implement in clk_enable. | 101 | * called in a sleepable context may be implemented in clk_enable. |
93 | * | 102 | * |
94 | * Typically, drivers will call clk_prepare when a clock may be needed later | 103 | * Typically, drivers will call clk_prepare when a clock may be needed later |
95 | * (eg. when a device is opened), and clk_enable when the clock is actually | 104 | * (eg. when a device is opened), and clk_enable when the clock is actually |
@@ -102,6 +111,7 @@ struct clk_ops { | |||
102 | int (*enable)(struct clk_hw *hw); | 111 | int (*enable)(struct clk_hw *hw); |
103 | void (*disable)(struct clk_hw *hw); | 112 | void (*disable)(struct clk_hw *hw); |
104 | int (*is_enabled)(struct clk_hw *hw); | 113 | int (*is_enabled)(struct clk_hw *hw); |
114 | void (*disable_unused)(struct clk_hw *hw); | ||
105 | unsigned long (*recalc_rate)(struct clk_hw *hw, | 115 | unsigned long (*recalc_rate)(struct clk_hw *hw, |
106 | unsigned long parent_rate); | 116 | unsigned long parent_rate); |
107 | long (*round_rate)(struct clk_hw *hw, unsigned long, | 117 | long (*round_rate)(struct clk_hw *hw, unsigned long, |
@@ -327,19 +337,21 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, | |||
327 | * error code; drivers must test for an error code after calling clk_register. | 337 | * error code; drivers must test for an error code after calling clk_register. |
328 | */ | 338 | */ |
329 | struct clk *clk_register(struct device *dev, struct clk_hw *hw); | 339 | struct clk *clk_register(struct device *dev, struct clk_hw *hw); |
340 | struct clk *devm_clk_register(struct device *dev, struct clk_hw *hw); | ||
330 | 341 | ||
331 | void clk_unregister(struct clk *clk); | 342 | void clk_unregister(struct clk *clk); |
343 | void devm_clk_unregister(struct device *dev, struct clk *clk); | ||
332 | 344 | ||
333 | /* helper functions */ | 345 | /* helper functions */ |
334 | const char *__clk_get_name(struct clk *clk); | 346 | const char *__clk_get_name(struct clk *clk); |
335 | struct clk_hw *__clk_get_hw(struct clk *clk); | 347 | struct clk_hw *__clk_get_hw(struct clk *clk); |
336 | u8 __clk_get_num_parents(struct clk *clk); | 348 | u8 __clk_get_num_parents(struct clk *clk); |
337 | struct clk *__clk_get_parent(struct clk *clk); | 349 | struct clk *__clk_get_parent(struct clk *clk); |
338 | int __clk_get_enable_count(struct clk *clk); | 350 | unsigned int __clk_get_enable_count(struct clk *clk); |
339 | int __clk_get_prepare_count(struct clk *clk); | 351 | unsigned int __clk_get_prepare_count(struct clk *clk); |
340 | unsigned long __clk_get_rate(struct clk *clk); | 352 | unsigned long __clk_get_rate(struct clk *clk); |
341 | unsigned long __clk_get_flags(struct clk *clk); | 353 | unsigned long __clk_get_flags(struct clk *clk); |
342 | int __clk_is_enabled(struct clk *clk); | 354 | bool __clk_is_enabled(struct clk *clk); |
343 | struct clk *__clk_lookup(const char *name); | 355 | struct clk *__clk_lookup(const char *name); |
344 | 356 | ||
345 | /* | 357 | /* |
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h index b82f6ee66a0b..6ee4247df11e 100644 --- a/include/linux/mfd/db8500-prcmu.h +++ b/include/linux/mfd/db8500-prcmu.h | |||
@@ -515,7 +515,6 @@ enum romcode_read prcmu_get_rc_p2a(void); | |||
515 | enum ap_pwrst prcmu_get_xp70_current_state(void); | 515 | enum ap_pwrst prcmu_get_xp70_current_state(void); |
516 | bool prcmu_has_arm_maxopp(void); | 516 | bool prcmu_has_arm_maxopp(void); |
517 | struct prcmu_fw_version *prcmu_get_fw_version(void); | 517 | struct prcmu_fw_version *prcmu_get_fw_version(void); |
518 | int prcmu_request_ape_opp_100_voltage(bool enable); | ||
519 | int prcmu_release_usb_wakeup_state(void); | 518 | int prcmu_release_usb_wakeup_state(void); |
520 | void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep, | 519 | void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep, |
521 | struct prcmu_auto_pm_config *idle); | 520 | struct prcmu_auto_pm_config *idle); |
@@ -564,6 +563,7 @@ int db8500_prcmu_set_arm_opp(u8 opp); | |||
564 | int db8500_prcmu_get_arm_opp(void); | 563 | int db8500_prcmu_get_arm_opp(void); |
565 | int db8500_prcmu_set_ape_opp(u8 opp); | 564 | int db8500_prcmu_set_ape_opp(u8 opp); |
566 | int db8500_prcmu_get_ape_opp(void); | 565 | int db8500_prcmu_get_ape_opp(void); |
566 | int db8500_prcmu_request_ape_opp_100_voltage(bool enable); | ||
567 | int db8500_prcmu_set_ddr_opp(u8 opp); | 567 | int db8500_prcmu_set_ddr_opp(u8 opp); |
568 | int db8500_prcmu_get_ddr_opp(void); | 568 | int db8500_prcmu_get_ddr_opp(void); |
569 | 569 | ||
@@ -610,7 +610,7 @@ static inline int db8500_prcmu_get_ape_opp(void) | |||
610 | return APE_100_OPP; | 610 | return APE_100_OPP; |
611 | } | 611 | } |
612 | 612 | ||
613 | static inline int prcmu_request_ape_opp_100_voltage(bool enable) | 613 | static inline int db8500_prcmu_request_ape_opp_100_voltage(bool enable) |
614 | { | 614 | { |
615 | return 0; | 615 | return 0; |
616 | } | 616 | } |
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index c410d99bd667..c202d6c4d879 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
@@ -336,6 +336,11 @@ static inline int prcmu_get_ape_opp(void) | |||
336 | return db8500_prcmu_get_ape_opp(); | 336 | return db8500_prcmu_get_ape_opp(); |
337 | } | 337 | } |
338 | 338 | ||
339 | static inline int prcmu_request_ape_opp_100_voltage(bool enable) | ||
340 | { | ||
341 | return db8500_prcmu_request_ape_opp_100_voltage(enable); | ||
342 | } | ||
343 | |||
339 | static inline void prcmu_system_reset(u16 reset_code) | 344 | static inline void prcmu_system_reset(u16 reset_code) |
340 | { | 345 | { |
341 | return db8500_prcmu_system_reset(reset_code); | 346 | return db8500_prcmu_system_reset(reset_code); |
@@ -507,6 +512,11 @@ static inline int prcmu_get_ape_opp(void) | |||
507 | return APE_100_OPP; | 512 | return APE_100_OPP; |
508 | } | 513 | } |
509 | 514 | ||
515 | static inline int prcmu_request_ape_opp_100_voltage(bool enable) | ||
516 | { | ||
517 | return 0; | ||
518 | } | ||
519 | |||
510 | static inline int prcmu_set_arm_opp(u8 opp) | 520 | static inline int prcmu_set_arm_opp(u8 opp) |
511 | { | 521 | { |
512 | return 0; | 522 | return 0; |
diff --git a/include/linux/platform_data/clk-integrator.h b/include/linux/platform_data/clk-integrator.h index 83fe9c283bb8..280edac9d0a5 100644 --- a/include/linux/platform_data/clk-integrator.h +++ b/include/linux/platform_data/clk-integrator.h | |||
@@ -1 +1,3 @@ | |||
1 | void integrator_clk_init(bool is_cp); | 1 | void integrator_clk_init(bool is_cp); |
2 | void integrator_impd1_clk_init(void __iomem *base, unsigned int id); | ||
3 | void integrator_impd1_clk_exit(unsigned int id); | ||