of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / powerpc / include / asm / archrandom.h
blob85e88f7a59c0a072c14f6f686b252ab3b4b8c5ef
1 #ifndef _ASM_POWERPC_ARCHRANDOM_H
2 #define _ASM_POWERPC_ARCHRANDOM_H
4 #ifdef CONFIG_ARCH_RANDOM
6 #include <asm/machdep.h>
8 static inline int arch_get_random_long(unsigned long *v)
10 return 0;
13 static inline int arch_get_random_int(unsigned int *v)
15 return 0;
18 static inline int arch_get_random_seed_long(unsigned long *v)
20 if (ppc_md.get_random_seed)
21 return ppc_md.get_random_seed(v);
23 return 0;
25 static inline int arch_get_random_seed_int(unsigned int *v)
27 unsigned long val;
28 int rc;
30 rc = arch_get_random_long(&val);
31 if (rc)
32 *v = val;
34 return rc;
37 static inline int arch_has_random(void)
39 return 0;
42 static inline int arch_has_random_seed(void)
44 return !!ppc_md.get_random_seed;
46 #endif /* CONFIG_ARCH_RANDOM */
48 #ifdef CONFIG_PPC_POWERNV
49 int powernv_hwrng_present(void);
50 int powernv_get_random_long(unsigned long *v);
51 int powernv_get_random_real_mode(unsigned long *v);
52 #else
53 static inline int powernv_hwrng_present(void) { return 0; }
54 static inline int powernv_get_random_real_mode(unsigned long *v) { return 0; }
55 #endif
57 #endif /* _ASM_POWERPC_ARCHRANDOM_H */