1caab277bSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 24182de9eSLey Foon Tan /* Copyright Altera Corporation (C) 2014. All rights reserved. 34182de9eSLey Foon Tan */ 44182de9eSLey Foon Tan 54182de9eSLey Foon Tan #ifndef _ASM_NIOS2_TIMEX_H 64182de9eSLey Foon Tan #define _ASM_NIOS2_TIMEX_H 74182de9eSLey Foon Tan 84182de9eSLey Foon Tan typedef unsigned long cycles_t; 94182de9eSLey Foon Tan 104182de9eSLey Foon Tan extern cycles_t get_cycles(void); 11*c04e7270SJason A. Donenfeld #define get_cycles get_cycles 12*c04e7270SJason A. Donenfeld 13*c04e7270SJason A. Donenfeld #define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback()) 144182de9eSLey Foon Tan 154182de9eSLey Foon Tan #endif 16