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 DECLARE_INSTANCE_CHECKER(IMXRNGCState, IMX_RNGC, 19 TYPE_IMX_RNGC) 20 21 struct IMXRNGCState { 22 /*< private >*/ 23 SysBusDevice parent_obj; 24 25 /*< public >*/ 26 MemoryRegion iomem; 27 28 uint8_t op_self_test; 29 uint8_t op_seed; 30 uint8_t mask; 31 bool auto_seed; 32 33 QEMUBH *self_test_bh; 34 QEMUBH *seed_bh; 35 qemu_irq irq; 36 }; 37 38 #endif /* IMX_RNGC_H */ 39