Lines Matching defs:msel
309 static u32 lpc18xx_pll0_msel2mdec(u32 msel)
313 switch (msel) {
318 for (i = msel; i <= LPC18XX_PLL0_MSEL_MAX; i++)
325 static u32 lpc18xx_pll0_msel2seli(u32 msel)
329 if (msel > 16384) return 1;
330 if (msel > 8192) return 2;
331 if (msel > 2048) return 4;
332 if (msel >= 501) return 8;
333 if (msel >= 60) {
334 tmp = 1024 / (msel + 9);
335 return ((1024 == (tmp * (msel + 9))) == 0) ? tmp * 4 : (tmp + 1) * 4;
338 return (msel & 0x3c) + 4;
342 static u32 lpc18xx_pll0_msel2selp(u32 msel)
344 if (msel < 60)
345 return (msel >> 1) + 1;
354 u32 ctrl, mdiv, msel, npdiv;
368 msel = lpc18xx_pll0_mdec2msel(mdiv & LPC18XX_PLL0_MDIV_MDEC_MASK);
369 if (msel)
370 return 2 * msel * parent_rate;
458 u16 msel, nsel, psel;
468 msel = ((ctrl >> 16) & 0xff) + 1;
472 return msel * (parent_rate / nsel);
477 return (msel / (2 * psel)) * (parent_rate / nsel);