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 15 #define TYPE_IMX_RNGC "imx.rngc" 16 #define IMX_RNGC(obj) OBJECT_CHECK(IMXRNGCState, (obj), TYPE_IMX_RNGC) 17 18 typedef struct IMXRNGCState { 19 /*< private >*/ 20 SysBusDevice parent_obj; 21 22 /*< public >*/ 23 MemoryRegion iomem; 24 25 uint8_t op_self_test; 26 uint8_t op_seed; 27 uint8_t mask; 28 bool auto_seed; 29 30 QEMUBH *self_test_bh; 31 QEMUBH *seed_bh; 32 qemu_irq irq; 33 } IMXRNGCState; 34 35 #endif /* IMX_RNGC_H */ 36