2 * R-Car Gen3 Clock Pulse Generator
4 * Copyright (C) 2015-2016 Glider bvba
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
11 #ifndef __CLK_RENESAS_RCAR_GEN3_CPG_H__
12 #define __CLK_RENESAS_RCAR_GEN3_CPG_H__
14 enum rcar_gen3_clk_types
{
15 CLK_TYPE_GEN3_MAIN
= CLK_TYPE_CUSTOM
,
28 #define DEF_GEN3_SD(_name, _id, _parent, _offset) \
29 DEF_BASE(_name, _id, CLK_TYPE_GEN3_SD, _parent, .offset = _offset)
31 #define DEF_GEN3_PE(_name, _id, _parent_sscg, _div_sscg, _parent_clean, \
33 DEF_BASE(_name, _id, CLK_TYPE_GEN3_PE, \
34 (_parent_sscg) << 16 | (_parent_clean), \
35 .div = (_div_sscg) << 16 | (_div_clean))
37 struct rcar_gen3_cpg_pll_config
{
45 #define CPG_RCKCR 0x240
47 struct clk
*rcar_gen3_cpg_clk_register(struct device
*dev
,
48 const struct cpg_core_clk
*core
, const struct cpg_mssr_info
*info
,
49 struct clk
**clks
, void __iomem
*base
,
50 struct raw_notifier_head
*notifiers
);
51 int rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config
*config
,
52 unsigned int clk_extalr
, u32 mode
);