omap2_get_crystal_rate() calculates osc_ck and sys_ck rates
incorrectly. osc_ck runs at the same rate as the external clock
source. Also, sys_ck's rate derives from osc_ck's rate, divided (not
multiplied) by PRCM_CLKSRC_CTRL:SYSCLKDIV.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
div &= OMAP_SYSCLKDIV_MASK;
div >>= sys->rate_offset;
- osc->rate = sclk * div;
- sys->rate = sclk;
+ osc->rate = sclk;
+ sys->rate = osc->rate / div;
}
/*