1
2
3
4
5
6
7
8
9#ifndef __RNG_H__
10#define __RNG_H__
11
12
13typedef struct rng_ctrl {
14 u32 cr;
15 u32 sr;
16 u32 er;
17 u32 out;
18} rng_t;
19
20#define RNG_CR_SLM (0x00000010)
21#define RNG_CR_CI (0x00000008)
22#define RNG_CR_IM (0x00000004)
23#define RNG_CR_HA (0x00000002)
24#define RNG_CR_GO (0x00000001)
25
26#define RNG_SR_OFS(x) (((x) & 0x000000FF) << 16)
27#define RNG_SR_OFS_MASK (0xFF00FFFF)
28#define RNG_SR_OFL(x) (((x) & 0x000000FF) << 8)
29#define RNG_SR_OFL_MASK (0xFFFF00FF)
30#define RNG_SR_EI (0x00000008)
31#define RNG_SR_FUF (0x00000004)
32#define RNG_SR_LRS (0x00000002)
33#define RNG_SR_SV (0x00000001)
34
35#endif
36