xref: /openbmc/qemu/include/hw/misc/bcm2835_rng.h (revision 6f9ff551)
1 /*
2  * BCM2835 Random Number Generator emulation
3  *
4  * Copyright (C) 2017 Marcin Chojnacki <marcinch7@gmail.com>
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  */
9 
10 #ifndef BCM2835_RNG_H
11 #define BCM2835_RNG_H
12 
13 #include "hw/sysbus.h"
14 #include "qom/object.h"
15 
16 #define TYPE_BCM2835_RNG "bcm2835-rng"
17 typedef struct BCM2835RngState BCM2835RngState;
18 DECLARE_INSTANCE_CHECKER(BCM2835RngState, BCM2835_RNG,
19                          TYPE_BCM2835_RNG)
20 
21 struct BCM2835RngState {
22     SysBusDevice busdev;
23     MemoryRegion iomem;
24 
25     uint32_t rng_ctrl;
26     uint32_t rng_status;
27 };
28 
29 #endif
30