• Home
  • Raw
  • Download

Lines Matching refs:msel

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