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