xref: /openbmc/qemu/target/cris/cpu-qom.h (revision fcf5ef2a)
1*fcf5ef2aSThomas Huth /*
2*fcf5ef2aSThomas Huth  * QEMU CRIS CPU
3*fcf5ef2aSThomas Huth  *
4*fcf5ef2aSThomas Huth  * Copyright (c) 2012 SUSE LINUX Products GmbH
5*fcf5ef2aSThomas Huth  *
6*fcf5ef2aSThomas Huth  * This library is free software; you can redistribute it and/or
7*fcf5ef2aSThomas Huth  * modify it under the terms of the GNU Lesser General Public
8*fcf5ef2aSThomas Huth  * License as published by the Free Software Foundation; either
9*fcf5ef2aSThomas Huth  * version 2.1 of the License, or (at your option) any later version.
10*fcf5ef2aSThomas Huth  *
11*fcf5ef2aSThomas Huth  * This library is distributed in the hope that it will be useful,
12*fcf5ef2aSThomas Huth  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*fcf5ef2aSThomas Huth  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*fcf5ef2aSThomas Huth  * Lesser General Public License for more details.
15*fcf5ef2aSThomas Huth  *
16*fcf5ef2aSThomas Huth  * You should have received a copy of the GNU Lesser General Public
17*fcf5ef2aSThomas Huth  * License along with this library; if not, see
18*fcf5ef2aSThomas Huth  * <http://www.gnu.org/licenses/lgpl-2.1.html>
19*fcf5ef2aSThomas Huth  */
20*fcf5ef2aSThomas Huth #ifndef QEMU_CRIS_CPU_QOM_H
21*fcf5ef2aSThomas Huth #define QEMU_CRIS_CPU_QOM_H
22*fcf5ef2aSThomas Huth 
23*fcf5ef2aSThomas Huth #include "qom/cpu.h"
24*fcf5ef2aSThomas Huth 
25*fcf5ef2aSThomas Huth #define TYPE_CRIS_CPU "cris-cpu"
26*fcf5ef2aSThomas Huth 
27*fcf5ef2aSThomas Huth #define CRIS_CPU_CLASS(klass) \
28*fcf5ef2aSThomas Huth     OBJECT_CLASS_CHECK(CRISCPUClass, (klass), TYPE_CRIS_CPU)
29*fcf5ef2aSThomas Huth #define CRIS_CPU(obj) \
30*fcf5ef2aSThomas Huth     OBJECT_CHECK(CRISCPU, (obj), TYPE_CRIS_CPU)
31*fcf5ef2aSThomas Huth #define CRIS_CPU_GET_CLASS(obj) \
32*fcf5ef2aSThomas Huth     OBJECT_GET_CLASS(CRISCPUClass, (obj), TYPE_CRIS_CPU)
33*fcf5ef2aSThomas Huth 
34*fcf5ef2aSThomas Huth /**
35*fcf5ef2aSThomas Huth  * CRISCPUClass:
36*fcf5ef2aSThomas Huth  * @parent_realize: The parent class' realize handler.
37*fcf5ef2aSThomas Huth  * @parent_reset: The parent class' reset handler.
38*fcf5ef2aSThomas Huth  * @vr: Version Register value.
39*fcf5ef2aSThomas Huth  *
40*fcf5ef2aSThomas Huth  * A CRIS CPU model.
41*fcf5ef2aSThomas Huth  */
42*fcf5ef2aSThomas Huth typedef struct CRISCPUClass {
43*fcf5ef2aSThomas Huth     /*< private >*/
44*fcf5ef2aSThomas Huth     CPUClass parent_class;
45*fcf5ef2aSThomas Huth     /*< public >*/
46*fcf5ef2aSThomas Huth 
47*fcf5ef2aSThomas Huth     DeviceRealize parent_realize;
48*fcf5ef2aSThomas Huth     void (*parent_reset)(CPUState *cpu);
49*fcf5ef2aSThomas Huth 
50*fcf5ef2aSThomas Huth     uint32_t vr;
51*fcf5ef2aSThomas Huth } CRISCPUClass;
52*fcf5ef2aSThomas Huth 
53*fcf5ef2aSThomas Huth typedef struct CRISCPU CRISCPU;
54*fcf5ef2aSThomas Huth 
55*fcf5ef2aSThomas Huth #endif
56