1 /* SPDX-License-Identifier: GPL-2.0 */
3 * R-Car Gen3 Clock Pulse Generator Library
5 * Copyright (C) 2015-2018 Glider bvba
6 * Copyright (C) 2019 Renesas Electronics Corp.
8 * Based on clk-rcar-gen3.c
10 * Copyright (C) 2015 Renesas Electronics Corp.
13 #ifndef __CLK_RENESAS_RCAR_CPG_LIB_H__
14 #define __CLK_RENESAS_RCAR_CPG_LIB_H__
16 extern spinlock_t cpg_lock;
18 struct cpg_simple_notifier {
19 struct notifier_block nb;
24 void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
25 struct cpg_simple_notifier *csn);
27 void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set);
29 struct clk * __init cpg_sdh_clk_register(const char *name,
30 void __iomem *sdnckcr, const char *parent_name,
31 struct raw_notifier_head *notifiers);
33 struct clk * __init cpg_sd_clk_register(const char *name,
34 void __iomem *sdnckcr, const char *parent_name);
36 struct clk * __init cpg_rpc_clk_register(const char *name,
37 void __iomem *rpcckcr, const char *parent_name,
38 struct raw_notifier_head *notifiers);
40 struct clk * __init cpg_rpcd2_clk_register(const char *name,
41 void __iomem *rpcckcr,
42 const char *parent_name);