ARM: amba: Make driver_override output consistent with other buses
[linux/fpc-iii.git] / arch / powerpc / include / asm / archrandom.h
blob9c63b596e6ce549885dd9bc9b3c4982ccef50f21
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_ARCHRANDOM_H
3 #define _ASM_POWERPC_ARCHRANDOM_H
5 #ifdef CONFIG_ARCH_RANDOM
7 #include <asm/machdep.h>
9 static inline int arch_get_random_long(unsigned long *v)
11 return 0;
14 static inline int arch_get_random_int(unsigned int *v)
16 return 0;
19 static inline int arch_get_random_seed_long(unsigned long *v)
21 if (ppc_md.get_random_seed)
22 return ppc_md.get_random_seed(v);
24 return 0;
26 static inline int arch_get_random_seed_int(unsigned int *v)
28 unsigned long val;
29 int rc;
31 rc = arch_get_random_long(&val);
32 if (rc)
33 *v = val;
35 return rc;
38 static inline int arch_has_random(void)
40 return 0;
43 static inline int arch_has_random_seed(void)
45 return !!ppc_md.get_random_seed;
47 #endif /* CONFIG_ARCH_RANDOM */
49 #ifdef CONFIG_PPC_POWERNV
50 int powernv_hwrng_present(void);
51 int powernv_get_random_long(unsigned long *v);
52 int powernv_get_random_real_mode(unsigned long *v);
53 #else
54 static inline int powernv_hwrng_present(void) { return 0; }
55 static inline int powernv_get_random_real_mode(unsigned long *v) { return 0; }
56 #endif
58 #endif /* _ASM_POWERPC_ARCHRANDOM_H */