clk-icst.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. struct regmap;
  3. /**
  4. * enum icst_control_type - the type of ICST control register
  5. */
  6. enum icst_control_type {
  7. ICST_VERSATILE, /* The standard type, all control bits available */
  8. ICST_INTEGRATOR_AP_CM, /* Only 8 bits of VDW available */
  9. ICST_INTEGRATOR_AP_SYS, /* Only 8 bits of VDW available */
  10. ICST_INTEGRATOR_AP_PCI, /* Odd bit pattern storage */
  11. ICST_INTEGRATOR_CP_CM_CORE, /* Only 8 bits of VDW and 3 bits of OD */
  12. ICST_INTEGRATOR_CP_CM_MEM, /* Only 8 bits of VDW and 3 bits of OD */
  13. ICST_INTEGRATOR_IM_PD1, /* Like the Versatile, all control bits */
  14. };
  15. /**
  16. * struct clk_icst_desc - descriptor for the ICST VCO
  17. * @params: ICST parameters
  18. * @vco_offset: offset to the ICST VCO from the provided memory base
  19. * @lock_offset: offset to the ICST VCO locking register from the provided
  20. * memory base
  21. */
  22. struct clk_icst_desc {
  23. const struct icst_params *params;
  24. u32 vco_offset;
  25. u32 lock_offset;
  26. };
  27. struct clk *icst_clk_register(struct device *dev,
  28. const struct clk_icst_desc *desc,
  29. const char *name,
  30. const char *parent_name,
  31. void __iomem *base);
  32. struct clk *icst_clk_setup(struct device *dev,
  33. const struct clk_icst_desc *desc,
  34. const char *name,
  35. const char *parent_name,
  36. struct regmap *map,
  37. enum icst_control_type ctype);