clk-hfpll.h 742 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __QCOM_CLK_HFPLL_H__
  3. #define __QCOM_CLK_HFPLL_H__
  4. #include <linux/clk-provider.h>
  5. #include <linux/spinlock.h>
  6. #include "clk-regmap.h"
  7. struct hfpll_data {
  8. u32 mode_reg;
  9. u32 l_reg;
  10. u32 m_reg;
  11. u32 n_reg;
  12. u32 user_reg;
  13. u32 droop_reg;
  14. u32 config_reg;
  15. u32 status_reg;
  16. u8 lock_bit;
  17. u32 droop_val;
  18. u32 config_val;
  19. u32 user_val;
  20. u32 user_vco_mask;
  21. unsigned long low_vco_max_rate;
  22. unsigned long min_rate;
  23. unsigned long max_rate;
  24. };
  25. struct clk_hfpll {
  26. struct hfpll_data const *d;
  27. int init_done;
  28. struct clk_regmap clkr;
  29. spinlock_t lock;
  30. };
  31. #define to_clk_hfpll(_hw) \
  32. container_of(to_clk_regmap(_hw), struct clk_hfpll, clkr)
  33. extern const struct clk_ops clk_ops_hfpll;
  34. #endif