rcar-gen2-cpg.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * R-Car Gen2 Clock Pulse Generator
  3. *
  4. * Copyright (C) 2016 Cogent Embedded Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation; version 2 of the License.
  9. */
  10. #ifndef __CLK_RENESAS_RCAR_GEN2_CPG_H__
  11. #define __CLK_RENESAS_RCAR_GEN2_CPG_H__
  12. enum rcar_gen2_clk_types {
  13. CLK_TYPE_GEN2_MAIN = CLK_TYPE_CUSTOM,
  14. CLK_TYPE_GEN2_PLL0,
  15. CLK_TYPE_GEN2_PLL1,
  16. CLK_TYPE_GEN2_PLL3,
  17. CLK_TYPE_GEN2_Z,
  18. CLK_TYPE_GEN2_LB,
  19. CLK_TYPE_GEN2_ADSP,
  20. CLK_TYPE_GEN2_SDH,
  21. CLK_TYPE_GEN2_SD0,
  22. CLK_TYPE_GEN2_SD1,
  23. CLK_TYPE_GEN2_QSPI,
  24. CLK_TYPE_GEN2_RCAN,
  25. };
  26. struct rcar_gen2_cpg_pll_config {
  27. unsigned int extal_div;
  28. unsigned int pll1_mult;
  29. unsigned int pll3_mult;
  30. unsigned int pll0_mult; /* leave as zero if PLL0CR exists */
  31. };
  32. struct clk *rcar_gen2_cpg_clk_register(struct device *dev,
  33. const struct cpg_core_clk *core,
  34. const struct cpg_mssr_info *info,
  35. struct clk **clks, void __iomem *base);
  36. int rcar_gen2_cpg_init(const struct rcar_gen2_cpg_pll_config *config,
  37. unsigned int pll0_div, u32 mode);
  38. #endif