monitor: Fix tracepoint crash on JSON syntax error
[qemu/armbru.git] / include / hw / timer / digic-timer.h
blobd9e67fe291746f72570614d281761dcc2b918a40
1 /*
2 * Canon DIGIC timer block declarations.
4 * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
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.
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.
18 #ifndef HW_TIMER_DIGIC_TIMER_H
19 #define HW_TIMER_DIGIC_TIMER_H
21 #include "hw/sysbus.h"
22 #include "hw/ptimer.h"
24 #define TYPE_DIGIC_TIMER "digic-timer"
25 #define DIGIC_TIMER(obj) OBJECT_CHECK(DigicTimerState, (obj), TYPE_DIGIC_TIMER)
27 #define DIGIC_TIMER_CONTROL 0x00
28 #define DIGIC_TIMER_CONTROL_RST 0x80000000
29 #define DIGIC_TIMER_CONTROL_EN 0x00000001
30 #define DIGIC_TIMER_RELVALUE 0x08
31 #define DIGIC_TIMER_VALUE 0x0c
33 typedef struct DigicTimerState {
34 /*< private >*/
35 SysBusDevice parent_obj;
36 /*< public >*/
38 MemoryRegion iomem;
39 ptimer_state *ptimer;
41 uint32_t control;
42 uint32_t relvalue;
43 } DigicTimerState;
45 #endif /* HW_TIMER_DIGIC_TIMER_H */