s390x: add compat machine for 2.8
[qemu.git] / include / hw / timer / arm_mptimer.h
blobb34cba00ce97c503573930566031181ed7c5a53b
1 /*
2 * Private peripheral timer/watchdog blocks for ARM 11MPCore and A9MP
4 * Copyright (c) 2006-2007 CodeSourcery.
5 * Copyright (c) 2011 Linaro Limited
6 * Written by Paul Brook, Peter Maydell
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef HW_TIMER_ARM_MPTIMER_H
22 #define HW_TIMER_ARM_MPTIMER_H
24 #include "hw/sysbus.h"
26 #define ARM_MPTIMER_MAX_CPUS 4
28 /* State of a single timer or watchdog block */
29 typedef struct {
30 uint32_t count;
31 uint32_t load;
32 uint32_t control;
33 uint32_t status;
34 int64_t tick;
35 QEMUTimer *timer;
36 qemu_irq irq;
37 MemoryRegion iomem;
38 } TimerBlock;
40 #define TYPE_ARM_MPTIMER "arm_mptimer"
41 #define ARM_MPTIMER(obj) \
42 OBJECT_CHECK(ARMMPTimerState, (obj), TYPE_ARM_MPTIMER)
44 typedef struct {
45 /*< private >*/
46 SysBusDevice parent_obj;
47 /*< public >*/
49 uint32_t num_cpu;
50 TimerBlock timerblock[ARM_MPTIMER_MAX_CPUS];
51 MemoryRegion iomem;
52 } ARMMPTimerState;
54 #endif