• Home
  • Raw
  • Download

Lines Matching refs:mckr

115 	unsigned freq, mckr;  in at91_clock_init()  local
155 mckr = readl(&pmc->mckr); in at91_clock_init()
159 gd->arch.plla_rate_hz /= (1 << ((mckr & 1 << 12) >> 12)); in at91_clock_init()
161 gd->arch.mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK); in at91_clock_init()
166 freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 4)); in at91_clock_init()
168 freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */ in at91_clock_init()
173 gd->arch.mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ? in at91_clock_init()
174 freq / ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 7) : freq; in at91_clock_init()
175 if (mckr & AT91_PMC_MCKR_MDIV_MASK) in at91_clock_init()
185 gd->arch.mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) == in at91_clock_init()
188 : freq / (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8)); in at91_clock_init()
191 (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8)); in at91_clock_init()
219 void at91_mck_init(u32 mckr) in at91_mck_init() argument
224 tmp = readl(&pmc->mckr); in at91_mck_init()
226 tmp |= mckr & AT91_PMC_MCKR_PRES_MASK; in at91_mck_init()
227 writel(tmp, &pmc->mckr); in at91_mck_init()
231 tmp = readl(&pmc->mckr); in at91_mck_init()
233 tmp |= mckr & AT91_PMC_MCKR_MDIV_MASK; in at91_mck_init()
234 writel(tmp, &pmc->mckr); in at91_mck_init()
238 tmp = readl(&pmc->mckr); in at91_mck_init()
240 tmp |= mckr & AT91_PMC_MCKR_PLLADIV_MASK; in at91_mck_init()
241 writel(tmp, &pmc->mckr); in at91_mck_init()
245 tmp = readl(&pmc->mckr); in at91_mck_init()
247 tmp |= mckr & AT91_PMC_MCKR_CSS_MASK; in at91_mck_init()
248 writel(tmp, &pmc->mckr); in at91_mck_init()