xref: /openbmc/qemu/include/hw/arm/digic.h (revision 8ea952d6)
1 /*
2  * Misc Canon DIGIC declarations.
3  *
4  * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  */
17 
18 #ifndef HW_ARM_DIGIC_H
19 #define HW_ARM_DIGIC_H
20 
21 #include "hw/timer/digic-timer.h"
22 #include "hw/char/digic-uart.h"
23 
24 #define TYPE_DIGIC "digic"
25 
26 #define DIGIC(obj) OBJECT_CHECK(DigicState, (obj), TYPE_DIGIC)
27 
28 #define DIGIC4_NB_TIMERS 3
29 
30 typedef struct DigicState {
31     /*< private >*/
32     DeviceState parent_obj;
33     /*< public >*/
34 
35     ARMCPU cpu;
36 
37     DigicTimerState timer[DIGIC4_NB_TIMERS];
38     DigicUartState uart;
39 } DigicState;
40 
41 #endif /* HW_ARM_DIGIC_H */
42