]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/m68k/include/asm/coldfire/rng.h
Move architecture-specific includes to arch/$ARCH/include/asm
[karo-tx-uboot.git] / arch / m68k / include / asm / coldfire / rng.h
1 /*
2  * RNG Memory Map
3  *
4  * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
5  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6  *
7  * See file CREDITS for list of people who contributed to this
8  * project.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License as
12  * published by the Free Software Foundation; either version 2 of
13  * the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307 USA
24  */
25
26 #ifndef __RNG_H__
27 #define __RNG_H__
28
29 /* Random Number Generator */
30 typedef struct rng_ctrl {
31         u32 cr;                 /* 0x00 Control */
32         u32 sr;                 /* 0x04 Status */
33         u32 er;                 /* 0x08 Entropy */
34         u32 out;                /* 0x0C Output FIFO */
35 } rng_t;
36
37 #define RNG_CR_SLM              (0x00000010)    /* Sleep mode - 5445x */
38 #define RNG_CR_CI               (0x00000008)    /* Clear interrupt */
39 #define RNG_CR_IM               (0x00000004)    /* Interrupt mask */
40 #define RNG_CR_HA               (0x00000002)    /* High assurance */
41 #define RNG_CR_GO               (0x00000001)    /* Go bit */
42
43 #define RNG_SR_OFS(x)           (((x) & 0x000000FF) << 16)
44 #define RNG_SR_OFS_MASK         (0xFF00FFFF)
45 #define RNG_SR_OFL(x)           (((x) & 0x000000FF) << 8)
46 #define RNG_SR_OFL_MASK         (0xFFFF00FF)
47 #define RNG_SR_EI               (0x00000008)
48 #define RNG_SR_FUF              (0x00000004)
49 #define RNG_SR_LRS              (0x00000002)
50 #define RNG_SR_SV               (0x00000001)
51
52 #endif                          /* __RNG_H__ */