Lines Matching full:prescale
159 unsigned int prescale; in ingenic_tcu_recalc_rate() local
162 ret = regmap_read(tcu_clk->tcu->map, info->tcsr_reg, &prescale); in ingenic_tcu_recalc_rate()
165 prescale = (prescale & TCU_TCSR_PRESCALE_MASK) >> TCU_TCSR_PRESCALE_LSB; in ingenic_tcu_recalc_rate()
167 return parent_rate >> (prescale * 2); in ingenic_tcu_recalc_rate()
172 u8 prescale; in ingenic_tcu_get_prescale() local
174 for (prescale = 0; prescale < 5; prescale++) in ingenic_tcu_get_prescale()
175 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_tcu_get_prescale()
176 return prescale; in ingenic_tcu_get_prescale()
185 u8 prescale; in ingenic_tcu_determine_rate() local
192 prescale = ingenic_tcu_get_prescale(rate, req->rate); in ingenic_tcu_determine_rate()
194 req->rate = rate >> (prescale * 2); in ingenic_tcu_determine_rate()
203 u8 prescale = ingenic_tcu_get_prescale(parent_rate, req_rate); in ingenic_tcu_set_rate() local
211 prescale << TCU_TCSR_PRESCALE_LSB); in ingenic_tcu_set_rate()