.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* Copyright Altera Corporation (C) 2014. All rights reserved. |
---|
2 | | - * |
---|
3 | | - * This program is free software; you can redistribute it and/or modify |
---|
4 | | - * it under the terms of the GNU General Public License, version 2, |
---|
5 | | - * as published by the Free Software Foundation. |
---|
6 | | - * |
---|
7 | | - * This program is distributed in the hope that it will be useful, |
---|
8 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
9 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
10 | | - * GNU General Public License for more details. |
---|
11 | | - * |
---|
12 | | - * You should have received a copy of the GNU General Public License |
---|
13 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
14 | | - * |
---|
15 | 3 | */ |
---|
16 | 4 | |
---|
17 | 5 | #ifndef _ASM_NIOS2_TIMEX_H |
---|
.. | .. |
---|
20 | 8 | typedef unsigned long cycles_t; |
---|
21 | 9 | |
---|
22 | 10 | extern cycles_t get_cycles(void); |
---|
| 11 | +#define get_cycles get_cycles |
---|
| 12 | + |
---|
| 13 | +#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback()) |
---|
23 | 14 | |
---|
24 | 15 | #endif |
---|