18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * linux/include/asm-m68k/timex.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * m68k architecture timex specifications 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci#ifndef _ASMm68K_TIMEX_H 88c2ecf20Sopenharmony_ci#define _ASMm68K_TIMEX_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifdef CONFIG_COLDFIRE 118c2ecf20Sopenharmony_ci/* 128c2ecf20Sopenharmony_ci * CLOCK_TICK_RATE should give the underlying frequency of the tick timer 138c2ecf20Sopenharmony_ci * to make ntp work best. For Coldfires, that's the main clock. 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci#include <asm/coldfire.h> 168c2ecf20Sopenharmony_ci#define CLOCK_TICK_RATE MCF_CLK 178c2ecf20Sopenharmony_ci#else 188c2ecf20Sopenharmony_ci/* 198c2ecf20Sopenharmony_ci * This default CLOCK_TICK_RATE is probably wrong for many 68k boards 208c2ecf20Sopenharmony_ci * Users of those boards will need to check and modify accordingly 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_ci#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ 238c2ecf20Sopenharmony_ci#endif 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_citypedef unsigned long cycles_t; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistatic inline cycles_t get_cycles(void) 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci return 0; 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciextern unsigned long (*mach_random_get_entropy)(void); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cistatic inline unsigned long random_get_entropy(void) 358c2ecf20Sopenharmony_ci{ 368c2ecf20Sopenharmony_ci if (mach_random_get_entropy) 378c2ecf20Sopenharmony_ci return mach_random_get_entropy(); 388c2ecf20Sopenharmony_ci return random_get_entropy_fallback(); 398c2ecf20Sopenharmony_ci} 408c2ecf20Sopenharmony_ci#define random_get_entropy random_get_entropy 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#endif 43