rcar-gen2-cpg.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 gen2_clk_priv {
  33. void __iomem *base;
  34. struct cpg_mssr_info *info;
  35. struct clk clk_extal;
  36. struct clk clk_extal_usb;
  37. const struct rcar_gen2_cpg_pll_config *cpg_pll_config;
  38. };
  39. int gen2_clk_probe(struct udevice *dev);
  40. int gen2_clk_remove(struct udevice *dev);
  41. extern const struct clk_ops gen2_clk_ops;
  42. #endif