stratix10-clk.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 char *const *parent_names;
  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 char *const *parent_names;
  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 char *const *parent_names;
  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 char *const *parent_names;
  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 char *, const char *const *, u8,
  57. unsigned long, void __iomem *, unsigned long);
  58. struct clk *s10_register_periph(const char *, const char *,
  59. const char * const *, u8, unsigned long,
  60. void __iomem *, unsigned long);
  61. struct clk *s10_register_cnt_periph(const char *, const char *,
  62. const char * const *, u8,
  63. unsigned long, void __iomem *,
  64. unsigned long, u8, unsigned long,
  65. unsigned long);
  66. struct clk *s10_register_gate(const char *, const char *,
  67. const char * const *, u8,
  68. unsigned long, void __iomem *,
  69. unsigned long, unsigned long,
  70. unsigned long, unsigned long, u8,
  71. unsigned long, u8, u8);
  72. #endif /* __STRATIX10_CLK_H */