xref: /qemu/include/hw/misc/imx7_snvs.h (revision 0a7bc1c0457a803a89d6506e97d5b035992c7dff)
1*0a7bc1c0SAndrey Smirnov /*
2*0a7bc1c0SAndrey Smirnov  * Copyright (c) 2017, Impinj, Inc.
3*0a7bc1c0SAndrey Smirnov  *
4*0a7bc1c0SAndrey Smirnov  * i.MX7 SNVS block emulation code
5*0a7bc1c0SAndrey Smirnov  *
6*0a7bc1c0SAndrey Smirnov  * Author: Andrey Smirnov <andrew.smirnov@gmail.com>
7*0a7bc1c0SAndrey Smirnov  *
8*0a7bc1c0SAndrey Smirnov  * This work is licensed under the terms of the GNU GPL, version 2 or later.
9*0a7bc1c0SAndrey Smirnov  * See the COPYING file in the top-level directory.
10*0a7bc1c0SAndrey Smirnov  */
11*0a7bc1c0SAndrey Smirnov 
12*0a7bc1c0SAndrey Smirnov #ifndef IMX7_SNVS_H
13*0a7bc1c0SAndrey Smirnov #define IMX7_SNVS_H
14*0a7bc1c0SAndrey Smirnov 
15*0a7bc1c0SAndrey Smirnov #include "qemu/bitops.h"
16*0a7bc1c0SAndrey Smirnov #include "hw/sysbus.h"
17*0a7bc1c0SAndrey Smirnov 
18*0a7bc1c0SAndrey Smirnov 
19*0a7bc1c0SAndrey Smirnov enum IMX7SNVSRegisters {
20*0a7bc1c0SAndrey Smirnov     SNVS_LPCR = 0x38,
21*0a7bc1c0SAndrey Smirnov     SNVS_LPCR_TOP   = BIT(6),
22*0a7bc1c0SAndrey Smirnov     SNVS_LPCR_DP_EN = BIT(5)
23*0a7bc1c0SAndrey Smirnov };
24*0a7bc1c0SAndrey Smirnov 
25*0a7bc1c0SAndrey Smirnov #define TYPE_IMX7_SNVS "imx7.snvs"
26*0a7bc1c0SAndrey Smirnov #define IMX7_SNVS(obj) OBJECT_CHECK(IMX7SNVSState, (obj), TYPE_IMX7_SNVS)
27*0a7bc1c0SAndrey Smirnov 
28*0a7bc1c0SAndrey Smirnov typedef struct IMX7SNVSState {
29*0a7bc1c0SAndrey Smirnov     /* <private> */
30*0a7bc1c0SAndrey Smirnov     SysBusDevice parent_obj;
31*0a7bc1c0SAndrey Smirnov 
32*0a7bc1c0SAndrey Smirnov     MemoryRegion mmio;
33*0a7bc1c0SAndrey Smirnov } IMX7SNVSState;
34*0a7bc1c0SAndrey Smirnov 
35*0a7bc1c0SAndrey Smirnov #endif /* IMX7_SNVS_H */
36