19 #include <linux/kernel.h>
20 #include <linux/errno.h>
24 #include <plat/clock.h>
33 #define CYCLES_PER_MHZ 1000000
55 unsigned long validrate, sdrcrate, _mpurate;
59 unsigned long clkrate;
65 if (validrate != rate)
71 sdrcrate <<= ((rate / clkrate) >> 1);
73 sdrcrate >>= ((clkrate /
rate) >> 1);
80 pr_debug(
"clock: will unlock SDRC DLL\n");
95 pr_debug(
"clock: changing CORE DPLL rate from %lu to %lu\n",
97 pr_debug(
"clock: SDRC CS0 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n",
101 pr_debug(
"clock: SDRC CS1 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n",
107 new_div, unlock_dll, c, rate > clkrate,
114 new_div, unlock_dll, c, rate > clkrate,