Lines Matching refs:calc_freq
426 int calc_freq; in mpc512x_clk_setup_ref_clock() local
447 calc_freq = clk_get_rate(clks[MPC512x_CLK_REF]); in mpc512x_clk_setup_ref_clock()
448 calc_freq *= *sys_mul; in mpc512x_clk_setup_ref_clock()
449 calc_freq /= *sys_div; in mpc512x_clk_setup_ref_clock()
450 calc_freq /= 2; in mpc512x_clk_setup_ref_clock()
451 calc_freq /= *ips_div; in mpc512x_clk_setup_ref_clock()
452 if (bus_freq && calc_freq != bus_freq) in mpc512x_clk_setup_ref_clock()
454 calc_freq, bus_freq); in mpc512x_clk_setup_ref_clock()
456 calc_freq = bus_freq; /* start with IPS */ in mpc512x_clk_setup_ref_clock()
457 calc_freq *= *ips_div; /* IPS -> CSB */ in mpc512x_clk_setup_ref_clock()
458 calc_freq *= 2; /* CSB -> SYS */ in mpc512x_clk_setup_ref_clock()
459 calc_freq *= *sys_div; /* SYS -> PLL out */ in mpc512x_clk_setup_ref_clock()
460 calc_freq /= *sys_mul; /* PLL out -> REF == OSC */ in mpc512x_clk_setup_ref_clock()
461 clks[MPC512x_CLK_REF] = mpc512x_clk_fixed("ref", calc_freq); in mpc512x_clk_setup_ref_clock()