Lines Matching refs:fuse
367 struct fuse_corner *fuse = corner->fuse_corner; in cpr_corner_restore() local
371 ro_sel = fuse->ring_osc_idx; in cpr_corner_restore()
373 gcnt |= fuse->quot - corner->quot_adjust; in cpr_corner_restore()
377 step_quot |= fuse->step_quot & RBCPR_STEP_QUOT_STEPQUOT_MASK; in cpr_corner_restore()
807 struct fuse_corner *fuse = drv->fuse_corners; in cpr_populate_ring_osc_idx() local
808 struct fuse_corner *end = fuse + drv->desc->num_fuse_corners; in cpr_populate_ring_osc_idx()
813 for (; fuse < end; fuse++, fuses++) { in cpr_populate_ring_osc_idx()
817 fuse->ring_osc_idx = data; in cpr_populate_ring_osc_idx()
856 struct fuse_corner *fuse, *end; in cpr_fuse_corner_init() local
868 fuse = drv->fuse_corners; in cpr_fuse_corner_init()
869 end = &fuse[desc->num_fuse_corners - 1]; in cpr_fuse_corner_init()
872 for (i = 0; fuse <= end; fuse++, fuses++, i++, fdata++) { in cpr_fuse_corner_init()
887 fuse->min_uV = fdata->min_uV; in cpr_fuse_corner_init()
888 fuse->max_uV = fdata->max_uV; in cpr_fuse_corner_init()
889 fuse->uV = clamp(uV, fuse->min_uV, fuse->max_uV); in cpr_fuse_corner_init()
891 if (fuse == end) { in cpr_fuse_corner_init()
902 ret = nvmem_cell_read_variable_le_u32(drv->dev, fuses->quotient, &fuse->quot); in cpr_fuse_corner_init()
906 fuse->quot *= fdata->quot_scale; in cpr_fuse_corner_init()
907 fuse->quot += fdata->quot_offset; in cpr_fuse_corner_init()
908 fuse->quot += fdata->quot_adjust; in cpr_fuse_corner_init()
909 fuse->step_quot = desc->step_quot[fuse->ring_osc_idx]; in cpr_fuse_corner_init()
912 fuse->accs = accs; in cpr_fuse_corner_init()
913 fuse->num_accs = acc_desc->num_regs_per_fuse; in cpr_fuse_corner_init()
921 for (fuse = drv->fuse_corners, i = 0; fuse <= end; fuse++, i++) { in cpr_fuse_corner_init()
922 if (fuse->uV > fuse->max_uV) in cpr_fuse_corner_init()
923 fuse->uV = fuse->max_uV; in cpr_fuse_corner_init()
924 else if (fuse->uV < fuse->min_uV) in cpr_fuse_corner_init()
925 fuse->uV = fuse->min_uV; in cpr_fuse_corner_init()
928 fuse->min_uV, in cpr_fuse_corner_init()
929 fuse->min_uV); in cpr_fuse_corner_init()
933 fuse->min_uV, i); in cpr_fuse_corner_init()
938 fuse->max_uV, in cpr_fuse_corner_init()
939 fuse->max_uV); in cpr_fuse_corner_init()
943 fuse->max_uV, i); in cpr_fuse_corner_init()
949 i, fuse->min_uV, fuse->uV, fuse->max_uV, in cpr_fuse_corner_init()
950 fuse->ring_osc_idx, fuse->quot, fuse->step_quot); in cpr_fuse_corner_init()
964 const struct fuse_corner *fuse, *prev_fuse; in cpr_calculate_scaling() local
967 fuse = corner->fuse_corner; in cpr_calculate_scaling()
968 prev_fuse = fuse - 1; in cpr_calculate_scaling()
978 quot_diff = fuse->quot - prev_fuse->quot; in cpr_calculate_scaling()
981 freq_diff = fuse->max_freq - prev_fuse->max_freq; in cpr_calculate_scaling()
993 const struct fuse_corner *fuse, *prev_fuse; in cpr_interpolate() local
995 fuse = corner->fuse_corner; in cpr_interpolate()
996 prev_fuse = fuse - 1; in cpr_interpolate()
998 f_high = fuse->max_freq; in cpr_interpolate()
1000 uV_high = fuse->uV; in cpr_interpolate()
1002 f_diff = fuse->max_freq - corner->freq; in cpr_interpolate()
1083 struct fuse_corner *fuse, *prev_fuse; in cpr_corner_init() local
1127 fuse = &drv->fuse_corners[fnum]; in cpr_corner_init()
1130 if (freq > fuse->max_freq) in cpr_corner_init()
1131 fuse->max_freq = freq; in cpr_corner_init()
1178 fuse = &drv->fuse_corners[fnum]; in cpr_corner_init()
1184 corner->fuse_corner = fuse; in cpr_corner_init()
1186 corner->uV = fuse->uV; in cpr_corner_init()
1195 } else if (corner->freq == fuse->max_freq) { in cpr_corner_init()
1201 freq_diff = fuse->max_freq - corner->freq; in cpr_corner_init()
1208 corner->max_uV = fuse->max_uV; in cpr_corner_init()
1209 corner->min_uV = fuse->min_uV; in cpr_corner_init()
1216 else if (desc->reduce_to_fuse_uV && fuse->uV < corner->max_uV) in cpr_corner_init()
1217 corner->max_uV = max(corner->min_uV, fuse->uV); in cpr_corner_init()
1221 fuse->quot - corner->quot_adjust); in cpr_corner_init()