Example #1
0
uint64_t
exynos_get_cpufreq(void)
{
	uint32_t regval;
	uint32_t freq;

	regval = bus_space_read_4(&armv7_generic_bs_tag, exynos_cmu_apll_bsh,
			PLL_CON0_OFFSET);
	freq   = PLL_FREQ(EXYNOS_F_IN_FREQ, regval);

	return freq;
}
Example #2
0
static unsigned int pll_get_rate(int n)
{
	unsigned int mode __UNUSED, L, M, N, freq;
	if (n == -1)
		return TCX0;
		
	if (n > 1) {
		return 0;
	} else {
		mode = readl(PLLn_BASE(n) + 0x0);
		L = readl(PLLn_BASE(n) + 0x4);
		M = readl(PLLn_BASE(n) + 0x8);
		N = readl(PLLn_BASE(n) + 0xc);
		freq = PLL_FREQ(L, M, N);
	}
	
	return freq;
}