Lines Matching refs:icst

4  * We wrap the custom interface from <asm/hardware/icst.h> into the generic
22 #include "icst.h"
23 #include "clk-icst.h"
60 * @icst: the ICST clock to get
63 static int vco_get(struct clk_icst *icst, struct icst_vco *vco)
68 ret = regmap_read(icst->map, icst->vcoreg_off, &val);
80 if (icst->ctype == ICST_INTEGRATOR_AP_CM) {
95 if (icst->ctype == ICST_INTEGRATOR_AP_SYS) {
110 if (icst->ctype == ICST_INTEGRATOR_AP_PCI) {
127 if (icst->ctype == ICST_INTEGRATOR_CP_CM_CORE) {
134 if (icst->ctype == ICST_INTEGRATOR_CP_CM_MEM) {
149 * @icst: the ICST clock to set
152 static int vco_set(struct clk_icst *icst, struct icst_vco vco)
159 switch (icst->ctype) {
206 ret = regmap_write(icst->map, icst->lockreg_off, VERSATILE_LOCK_VAL);
209 ret = regmap_update_bits(icst->map, icst->vcoreg_off, mask, val);
213 ret = regmap_write(icst->map, icst->lockreg_off, 0);
222 struct clk_icst *icst = to_icst(hw);
227 icst->params->ref = parent_rate;
228 ret = vco_get(icst, &vco);
233 icst->rate = icst_hz(icst->params, vco);
234 return icst->rate;
240 struct clk_icst *icst = to_icst(hw);
243 if (icst->ctype == ICST_INTEGRATOR_AP_CM ||
244 icst->ctype == ICST_INTEGRATOR_CP_CM_CORE) {
253 if (icst->ctype == ICST_INTEGRATOR_CP_CM_MEM) {
262 if (icst->ctype == ICST_INTEGRATOR_AP_SYS) {
272 if (icst->ctype == ICST_INTEGRATOR_AP_PCI) {
283 vco = icst_hz_to_vco(icst->params, rate);
284 return icst_hz(icst->params, vco);
290 struct clk_icst *icst = to_icst(hw);
293 if (icst->ctype == ICST_INTEGRATOR_AP_PCI) {
307 ret = regmap_write(icst->map, icst->lockreg_off,
311 ret = regmap_update_bits(icst->map, icst->vcoreg_off,
317 ret = regmap_write(icst->map, icst->lockreg_off, 0);
324 icst->params->ref = parent_rate;
325 vco = icst_hz_to_vco(icst->params, rate);
326 icst->rate = icst_hz(icst->params, vco);
327 return vco_set(icst, vco);
344 struct clk_icst *icst;
348 icst = kzalloc(sizeof(*icst), GFP_KERNEL);
349 if (!icst)
354 kfree(icst);
363 icst->map = map;
364 icst->hw.init = &init;
365 icst->params = pclone;
366 icst->vcoreg_off = desc->vco_offset;
367 icst->lockreg_off = desc->lock_offset;
368 icst->ctype = ctype;
370 clk = clk_register(dev, &icst->hw);
373 kfree(icst);