예제 #1
0
/*
 * Determine the cpu frequency by watching the TOD chip rollover twice.
 * Cpu clock rate is determined by computing the ticks added (in tick register)
 * during one second interval on TOD.
 */
uint64_t
todm5819_get_cpufrequency(void)
{
	ASSERT(MUTEX_HELD(&tod_lock));
	M5819_ADDR_REG = RTC_SEC;
	return (find_cpufrequency(v_rtc_data_reg));
}
예제 #2
0
/*
 * Determine the cpu frequency by watching the TOD chip rollover twice.
 * Cpu clock rate is determined by computing the ticks added (in tick register)
 * during one second interval on TOD.
 */
uint64_t
todds_get_cpufrequency(void)
{
	uint64_t cpu_freq;

	ASSERT(MUTEX_HELD(&tod_lock));
	mutex_enter(&ds1287_reg_mutex);

	select_bank(1);
	DS1287_ADDR_REG = RTC_SEC;
	cpu_freq = find_cpufrequency(v_rtc_data_reg);

	mutex_exit(&ds1287_reg_mutex);
	return (cpu_freq);
}
예제 #3
0
파일: todbq4802.c 프로젝트: andreiw/polaris
/*
 * Determine the cpu frequency by watching the TOD chip rollover twice.
 * Cpu clock rate is determined by computing the ticks added (in tick register)
 * during one second interval on TOD.
 */
uint64_t
todbq4802_get_cpufrequency(void)
{
	ASSERT(MUTEX_HELD(&tod_lock));
	return (find_cpufrequency((volatile uint8_t *)v_rtc_addr_reg));
}