linux_dsm_epyc7002/arch/m68k/include/asm/timex.h
Geert Uytterhoeven 017cecee99 m68k: Add infrastructure for machine-specific random_get_entropy()
On m68k, get_cycles() (the default implementation for random_get_entropy())
always returns zero, providing no entropy for the random driver.

Add a hook where platforms can provide their own implementation, and wire
it up in the infrastructure provided by commit
61875f30da ("random: allow architectures to
optionally define random_get_entropy()").

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:24 +01:00

42 lines
907 B
C

/*
* linux/include/asm-m68k/timex.h
*
* m68k architecture timex specifications
*/
#ifndef _ASMm68K_TIMEX_H
#define _ASMm68K_TIMEX_H
#ifdef CONFIG_COLDFIRE
/*
* CLOCK_TICK_RATE should give the underlying frequency of the tick timer
* to make ntp work best. For Coldfires, that's the main clock.
*/
#include <asm/coldfire.h>
#define CLOCK_TICK_RATE MCF_CLK
#else
/*
* This default CLOCK_TICK_RATE is probably wrong for many 68k boards
* Users of those boards will need to check and modify accordingly
*/
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
#endif
typedef unsigned long cycles_t;
static inline cycles_t get_cycles(void)
{
return 0;
}
extern unsigned long (*mach_random_get_entropy)(void);
static inline unsigned long random_get_entropy(void)
{
if (mach_random_get_entropy)
return mach_random_get_entropy();
return 0;
}
#define random_get_entropy random_get_entropy
#endif