xref: /openbmc/u-boot/arch/m68k/include/asm/coldfire/rng.h (revision 2290fe06)
1 /*
2  * RNG Memory Map
3  *
4  * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
5  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef __RNG_H__
11 #define __RNG_H__
12 
13 /* Random Number Generator */
14 typedef struct rng_ctrl {
15 	u32 cr;			/* 0x00 Control */
16 	u32 sr;			/* 0x04 Status */
17 	u32 er;			/* 0x08 Entropy */
18 	u32 out;		/* 0x0C Output FIFO */
19 } rng_t;
20 
21 #define RNG_CR_SLM		(0x00000010)	/* Sleep mode - 5445x */
22 #define RNG_CR_CI		(0x00000008)	/* Clear interrupt */
23 #define RNG_CR_IM		(0x00000004)	/* Interrupt mask */
24 #define RNG_CR_HA		(0x00000002)	/* High assurance */
25 #define RNG_CR_GO		(0x00000001)	/* Go bit */
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				/* __RNG_H__ */
37