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