bd4585c3c31e245632138a14873133805a6a356c
[rpi-open-firmware.git] / bcm2708_chip / rnghw.h
1 /*=============================================================================
2 Copyright (c) 2007 Broadcom Europe Limited. All rights reserved.
3
4 Project : BCM2707
5 Module : RNG hardware header
6 File : $RCSfile: rnghw.h,v $
7 Revision : $Revision: 1.2 $
8
9 FILE DESCRIPTION
10 Definition of bits within RNG hardware registers.
11 =============================================================================*/
12
13
14
15 #ifndef RNGHW_H
16 #define RNGHW_H
17
18 #define RNG_READFIELD(_w,_f) (((unsigned long)(_w) / _f) & (_f##_MASK))
19
20 enum
21 {
22 RNG_CTRL_RBG_2X = (1 << 1),
23 RNG_CTRL_RBG_EN = (1 << 0),
24
25 RNG_STATUS_WARM_CNT = (1 << 0),
26 RNG_STATUS_WARM_CNT_MASK = 0xfffff,
27 RNG_STATUS_VAL = (1 << 24),
28 RNG_STATUS_VAL_MASK = 0xff,
29
30 RNG_FF_THRESHOLD_MAX = 0x04,
31
32 // BCM2707_B0:
33 // RNG interrupt no longer uses Crypto local interrupt register
34 // It is connected to interrupt bit 52 : ISRC1_0 bit 52-32=20 (0x0100000)
35 // Mask has 6 IRQ/reg => floor(52/8)=6 Bits = 16:19
36
37 RNG_INT_MASK_ENABLE = (1 << 16),
38 RNG_INT_MASK_DISABLE = (0 << 16),
39
40 RNG_SIMCTRL_DEBUG = (1 << 0),
41 RNG_SIMCTRL_SECURE = (1 << 1)
42 };
43
44 #endif
This page took 0.076133 seconds and 3 git commands to generate.