1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun struct regmap; 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun /** 5*4882a593Smuzhiyun * enum icst_control_type - the type of ICST control register 6*4882a593Smuzhiyun */ 7*4882a593Smuzhiyun enum icst_control_type { 8*4882a593Smuzhiyun ICST_VERSATILE, /* The standard type, all control bits available */ 9*4882a593Smuzhiyun ICST_INTEGRATOR_AP_CM, /* Only 8 bits of VDW available */ 10*4882a593Smuzhiyun ICST_INTEGRATOR_AP_SYS, /* Only 8 bits of VDW available */ 11*4882a593Smuzhiyun ICST_INTEGRATOR_AP_PCI, /* Odd bit pattern storage */ 12*4882a593Smuzhiyun ICST_INTEGRATOR_CP_CM_CORE, /* Only 8 bits of VDW and 3 bits of OD */ 13*4882a593Smuzhiyun ICST_INTEGRATOR_CP_CM_MEM, /* Only 8 bits of VDW and 3 bits of OD */ 14*4882a593Smuzhiyun ICST_INTEGRATOR_IM_PD1, /* Like the Versatile, all control bits */ 15*4882a593Smuzhiyun }; 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun /** 18*4882a593Smuzhiyun * struct clk_icst_desc - descriptor for the ICST VCO 19*4882a593Smuzhiyun * @params: ICST parameters 20*4882a593Smuzhiyun * @vco_offset: offset to the ICST VCO from the provided memory base 21*4882a593Smuzhiyun * @lock_offset: offset to the ICST VCO locking register from the provided 22*4882a593Smuzhiyun * memory base 23*4882a593Smuzhiyun */ 24*4882a593Smuzhiyun struct clk_icst_desc { 25*4882a593Smuzhiyun const struct icst_params *params; 26*4882a593Smuzhiyun u32 vco_offset; 27*4882a593Smuzhiyun u32 lock_offset; 28*4882a593Smuzhiyun }; 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun struct clk *icst_clk_register(struct device *dev, 31*4882a593Smuzhiyun const struct clk_icst_desc *desc, 32*4882a593Smuzhiyun const char *name, 33*4882a593Smuzhiyun const char *parent_name, 34*4882a593Smuzhiyun void __iomem *base); 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun struct clk *icst_clk_setup(struct device *dev, 37*4882a593Smuzhiyun const struct clk_icst_desc *desc, 38*4882a593Smuzhiyun const char *name, 39*4882a593Smuzhiyun const char *parent_name, 40*4882a593Smuzhiyun struct regmap *map, 41*4882a593Smuzhiyun enum icst_control_type ctype); 42