blob: 40a1adc9bd03e9a62c05911bf30befa10b75b0e2 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/* Copyright Altera Corporation (C) 2014. All rights reserved.
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00003 */
4
5#ifndef _ASM_NIOS2_TIMEX_H
6#define _ASM_NIOS2_TIMEX_H
7
8typedef unsigned long cycles_t;
9
10extern cycles_t get_cycles(void);
Olivier Deprez92d4c212022-12-06 15:05:30 +010011#define get_cycles get_cycles
12
13#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000014
15#endif