diff options
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/archrandom.h | 32 | ||||
-rw-r--r-- | arch/powerpc/include/asm/machdep.h | 4 |
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h new file mode 100644 index 000000000000..d853d163ba47 --- /dev/null +++ b/arch/powerpc/include/asm/archrandom.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _ASM_POWERPC_ARCHRANDOM_H | ||
2 | #define _ASM_POWERPC_ARCHRANDOM_H | ||
3 | |||
4 | #ifdef CONFIG_ARCH_RANDOM | ||
5 | |||
6 | #include <asm/machdep.h> | ||
7 | |||
8 | static inline int arch_get_random_long(unsigned long *v) | ||
9 | { | ||
10 | if (ppc_md.get_random_long) | ||
11 | return ppc_md.get_random_long(v); | ||
12 | |||
13 | return 0; | ||
14 | } | ||
15 | |||
16 | static inline int arch_get_random_int(unsigned int *v) | ||
17 | { | ||
18 | unsigned long val; | ||
19 | int rc; | ||
20 | |||
21 | rc = arch_get_random_long(&val); | ||
22 | if (rc) | ||
23 | *v = val; | ||
24 | |||
25 | return rc; | ||
26 | } | ||
27 | |||
28 | int powernv_get_random_long(unsigned long *v); | ||
29 | |||
30 | #endif /* CONFIG_ARCH_RANDOM */ | ||
31 | |||
32 | #endif /* _ASM_POWERPC_ARCHRANDOM_H */ | ||
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 8b480901165a..ce6cc2a7b8b9 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -263,6 +263,10 @@ struct machdep_calls { | |||
263 | ssize_t (*cpu_probe)(const char *, size_t); | 263 | ssize_t (*cpu_probe)(const char *, size_t); |
264 | ssize_t (*cpu_release)(const char *, size_t); | 264 | ssize_t (*cpu_release)(const char *, size_t); |
265 | #endif | 265 | #endif |
266 | |||
267 | #ifdef CONFIG_ARCH_RANDOM | ||
268 | int (*get_random_long)(unsigned long *v); | ||
269 | #endif | ||
266 | }; | 270 | }; |
267 | 271 | ||
268 | extern void e500_idle(void); | 272 | extern void e500_idle(void); |