stratix10-clk.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2017, Intel Corporation
  4. */
  5. #ifndef __STRATIX10_CLK_H
  6. #define __STRATIX10_CLK_H
  7. struct stratix10_clock_data {
  8. struct clk_onecell_data clk_data;
  9. void __iomem *base;
  10. };
  11. struct stratix10_pll_clock {
  12. unsigned int id;
  13. const char *name;
  14. const struct clk_parent_data *parent_data;
  15. u8 num_parents;
  16. unsigned long flags;
  17. unsigned long offset;
  18. };
  19. struct stratix10_perip_c_clock {
  20. unsigned int id;
  21. const char *name;
  22. const char *parent_name;
  23. const struct clk_parent_data *parent_data;
  24. u8 num_parents;
  25. unsigned long flags;
  26. unsigned long offset;
  27. };
  28. struct stratix10_perip_cnt_clock {
  29. unsigned int id;
  30. const char *name;
  31. const char *parent_name;
  32. const struct clk_parent_data *parent_data;
  33. u8 num_parents;
  34. unsigned long flags;
  35. unsigned long offset;
  36. u8 fixed_divider;
  37. unsigned long bypass_reg;
  38. unsigned long bypass_shift;
  39. };
  40. struct stratix10_gate_clock {
  41. unsigned int id;
  42. const char *name;
  43. const char *parent_name;
  44. const struct clk_parent_data *parent_data;
  45. u8 num_parents;
  46. unsigned long flags;
  47. unsigned long gate_reg;
  48. u8 gate_idx;
  49. unsigned long div_reg;
  50. u8 div_offset;
  51. u8 div_width;
  52. unsigned long bypass_reg;
  53. u8 bypass_shift;
  54. u8 fixed_div;
  55. };
  56. struct clk *s10_register_pll(const struct stratix10_pll_clock *,
  57. void __iomem *);
  58. struct clk *agilex_register_pll(const struct stratix10_pll_clock *,
  59. void __iomem *);
  60. struct clk *s10_register_periph(const struct stratix10_perip_c_clock *,
  61. void __iomem *);
  62. struct clk *s10_register_cnt_periph(const struct stratix10_perip_cnt_clock *,
  63. void __iomem *);
  64. struct clk *s10_register_gate(const struct stratix10_gate_clock *,
  65. void __iomem *);
  66. #endif /* __STRATIX10_CLK_H */