Lines Matching refs:cpsdvsr
1737 static inline u32 spi_rate(u32 rate, u16 cpsdvsr, u16 scr) in spi_rate() argument
1739 return rate / (cpsdvsr * (1 + scr)); in spi_rate()
1746 u16 cpsdvsr = CPSDVR_MIN, scr = SCR_MIN; in calculate_effective_freq() local
1772 while ((cpsdvsr <= CPSDVR_MAX) && !found) { in calculate_effective_freq()
1774 tmp = spi_rate(rate, cpsdvsr, scr); in calculate_effective_freq()
1788 best_cpsdvsr = cpsdvsr; in calculate_effective_freq()
1800 cpsdvsr += 2; in calculate_effective_freq()
1807 clk_freq->cpsdvsr = (u8) (best_cpsdvsr & 0xFF); in calculate_effective_freq()
1813 clk_freq->cpsdvsr, clk_freq->scr); in calculate_effective_freq()
1852 struct ssp_clock_params clk_freq = { .cpsdvsr = 0, .scr = 0}; in pl022_setup()
1911 if ((0 == chip_info->clk_freq.cpsdvsr) in pl022_setup()
1920 if ((clk_freq.cpsdvsr % 2) != 0) in pl022_setup()
1921 clk_freq.cpsdvsr = in pl022_setup()
1922 clk_freq.cpsdvsr - 1; in pl022_setup()
1924 if ((clk_freq.cpsdvsr < CPSDVR_MIN) in pl022_setup()
1925 || (clk_freq.cpsdvsr > CPSDVR_MAX)) { in pl022_setup()
1997 chip->cpsr = clk_freq.cpsdvsr; in pl022_setup()