rcar-cpg-lib.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * R-Car Gen3 Clock Pulse Generator Library
  4. *
  5. * Copyright (C) 2015-2018 Glider bvba
  6. * Copyright (C) 2019 Renesas Electronics Corp.
  7. *
  8. * Based on clk-rcar-gen3.c
  9. *
  10. * Copyright (C) 2015 Renesas Electronics Corp.
  11. */
  12. #ifndef __CLK_RENESAS_RCAR_CPG_LIB_H__
  13. #define __CLK_RENESAS_RCAR_CPG_LIB_H__
  14. extern spinlock_t cpg_lock;
  15. struct cpg_simple_notifier {
  16. struct notifier_block nb;
  17. void __iomem *reg;
  18. u32 saved;
  19. };
  20. void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
  21. struct cpg_simple_notifier *csn);
  22. void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set);
  23. struct clk * __init cpg_sdh_clk_register(const char *name,
  24. void __iomem *sdnckcr, const char *parent_name,
  25. struct raw_notifier_head *notifiers);
  26. struct clk * __init cpg_sd_clk_register(const char *name,
  27. void __iomem *sdnckcr, const char *parent_name);
  28. struct clk * __init cpg_rpc_clk_register(const char *name,
  29. void __iomem *rpcckcr, const char *parent_name,
  30. struct raw_notifier_head *notifiers);
  31. struct clk * __init cpg_rpcd2_clk_register(const char *name,
  32. void __iomem *rpcckcr,
  33. const char *parent_name);
  34. #endif