]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/misc/imx_rngc.h
cd7ba8f91e984afaab33ac38826ce371f3ec470c
[mirror_qemu.git] / include / hw / misc / imx_rngc.h
1 /*
2 * Freescale i.MX RNGC emulation
3 *
4 * Copyright (C) 2020 Martin Kaiser <martin@kaiser.cx>
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 IMX_RNGC_H
11 #define IMX_RNGC_H
12
13 #include "hw/sysbus.h"
14 #include "qom/object.h"
15
16 #define TYPE_IMX_RNGC "imx.rngc"
17 typedef struct IMXRNGCState IMXRNGCState;
18 #define IMX_RNGC(obj) OBJECT_CHECK(IMXRNGCState, (obj), TYPE_IMX_RNGC)
19
20 struct IMXRNGCState {
21 /*< private >*/
22 SysBusDevice parent_obj;
23
24 /*< public >*/
25 MemoryRegion iomem;
26
27 uint8_t op_self_test;
28 uint8_t op_seed;
29 uint8_t mask;
30 bool auto_seed;
31
32 QEMUBH *self_test_bh;
33 QEMUBH *seed_bh;
34 qemu_irq irq;
35 };
36
37 #endif /* IMX_RNGC_H */