xref: /openbmc/qemu/include/hw/arm/armsse-version.h (revision 6f34661b)
1 /*
2  * ARM SSE (Subsystems for Embedded): IoTKit, SSE-200
3  *
4  * Copyright (c) 2020 Linaro Limited
5  * Written by Peter Maydell
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 or
9  * (at your option) any later version.
10  */
11 
12 #ifndef ARMSSE_VERSION_H
13 #define ARMSSE_VERSION_H
14 
15 
16 /*
17  * Define an enumeration of the possible values of the sse-version
18  * property implemented by various sub-devices of the SSE, and
19  * a validation function that checks that a valid value has been passed.
20  * These are arbitrary QEMU-internal values (nobody should be creating
21  * the sub-devices of the SSE except for the SSE object itself), but
22  * we pick obvious numbers for the benefit of people debugging with gdb.
23  */
24 enum {
25     ARMSSE_IOTKIT = 0,
26     ARMSSE_SSE200 = 200,
27     ARMSSE_SSE300 = 300,
28 };
29 
30 static inline bool armsse_version_valid(uint32_t sse_version)
31 {
32     switch (sse_version) {
33     case ARMSSE_IOTKIT:
34     case ARMSSE_SSE200:
35     case ARMSSE_SSE300:
36         return true;
37     default:
38         return false;
39     }
40 }
41 
42 #endif
43