Merge tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa
[linux-2.6-block.git] / drivers / clk / versatile / clk-icst.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
eb9d6428
LW
2struct regmap;
3
4/**
5 * enum icst_control_type - the type of ICST control register
6 */
7enum icst_control_type {
8 ICST_VERSATILE, /* The standard type, all control bits available */
9 ICST_INTEGRATOR_AP_CM, /* Only 8 bits of VDW available */
10 ICST_INTEGRATOR_AP_SYS, /* Only 8 bits of VDW available */
11 ICST_INTEGRATOR_AP_PCI, /* Odd bit pattern storage */
12 ICST_INTEGRATOR_CP_CM_CORE, /* Only 8 bits of VDW and 3 bits of OD */
13 ICST_INTEGRATOR_CP_CM_MEM, /* Only 8 bits of VDW and 3 bits of OD */
84655b76 14 ICST_INTEGRATOR_IM_PD1, /* Like the Versatile, all control bits */
eb9d6428
LW
15};
16
7a9ad671
LW
17/**
18 * struct clk_icst_desc - descriptor for the ICST VCO
19 * @params: ICST parameters
20 * @vco_offset: offset to the ICST VCO from the provided memory base
21 * @lock_offset: offset to the ICST VCO locking register from the provided
22 * memory base
23 */
91b87a47
LW
24struct clk_icst_desc {
25 const struct icst_params *params;
7a9ad671
LW
26 u32 vco_offset;
27 u32 lock_offset;
91b87a47
LW
28};
29
30struct clk *icst_clk_register(struct device *dev,
7a9ad671 31 const struct clk_icst_desc *desc,
ae6e694e 32 const char *name,
bf6edb4b 33 const char *parent_name,
7a9ad671 34 void __iomem *base);
eb9d6428
LW
35
36struct clk *icst_clk_setup(struct device *dev,
37 const struct clk_icst_desc *desc,
38 const char *name,
39 const char *parent_name,
40 struct regmap *map,
41 enum icst_control_type ctype);