Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * R-Car Gen3 Clock Pulse Generator Library
0004  *
0005  * Copyright (C) 2015-2018 Glider bvba
0006  * Copyright (C) 2019 Renesas Electronics Corp.
0007  *
0008  * Based on clk-rcar-gen3.c
0009  *
0010  * Copyright (C) 2015 Renesas Electronics Corp.
0011  */
0012 
0013 #ifndef __CLK_RENESAS_RCAR_CPG_LIB_H__
0014 #define __CLK_RENESAS_RCAR_CPG_LIB_H__
0015 
0016 extern spinlock_t cpg_lock;
0017 
0018 struct cpg_simple_notifier {
0019     struct notifier_block nb;
0020     void __iomem *reg;
0021     u32 saved;
0022 };
0023 
0024 void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
0025                   struct cpg_simple_notifier *csn);
0026 
0027 void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set);
0028 
0029 struct clk * __init cpg_sdh_clk_register(const char *name,
0030     void __iomem *sdnckcr, const char *parent_name,
0031     struct raw_notifier_head *notifiers);
0032 
0033 struct clk * __init cpg_sd_clk_register(const char *name,
0034     void __iomem *sdnckcr, const char *parent_name);
0035 
0036 struct clk * __init cpg_rpc_clk_register(const char *name,
0037     void __iomem *rpcckcr, const char *parent_name,
0038     struct raw_notifier_head *notifiers);
0039 
0040 struct clk * __init cpg_rpcd2_clk_register(const char *name,
0041                        void __iomem *rpcckcr,
0042                        const char *parent_name);
0043 #endif