Lines Matching full:ranges
147 struct range_t *ranges; in dw_mci_rk3288_execute_tuning() local
158 ranges = kmalloc_array(priv->num_phases / 2 + 1, in dw_mci_rk3288_execute_tuning()
159 sizeof(*ranges), GFP_KERNEL); in dw_mci_rk3288_execute_tuning()
160 if (!ranges) in dw_mci_rk3288_execute_tuning()
163 /* Try each phase and extract good ranges */ in dw_mci_rk3288_execute_tuning()
175 ranges[range_count-1].start = i; in dw_mci_rk3288_execute_tuning()
178 ranges[range_count-1].end = i; in dw_mci_rk3288_execute_tuning()
207 ranges[0].start = ranges[range_count-1].start; in dw_mci_rk3288_execute_tuning()
211 if (ranges[0].start == 0 && ranges[0].end == priv->num_phases - 1) { in dw_mci_rk3288_execute_tuning()
220 int len = (ranges[i].end - ranges[i].start + 1); in dw_mci_rk3288_execute_tuning()
231 TUNING_ITERATION_TO_PHASE(ranges[i].start, in dw_mci_rk3288_execute_tuning()
233 TUNING_ITERATION_TO_PHASE(ranges[i].end, in dw_mci_rk3288_execute_tuning()
240 TUNING_ITERATION_TO_PHASE(ranges[longest_range].start, in dw_mci_rk3288_execute_tuning()
242 TUNING_ITERATION_TO_PHASE(ranges[longest_range].end, in dw_mci_rk3288_execute_tuning()
247 middle_phase = ranges[longest_range].start + longest_range_len / 2; in dw_mci_rk3288_execute_tuning()
257 kfree(ranges); in dw_mci_rk3288_execute_tuning()