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