]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/timer/digic-timer.h
Use DECLARE_*CHECKER* macros
[mirror_qemu.git] / include / hw / timer / digic-timer.h
CommitLineData
576e99cb
AP
1/*
2 * Canon DIGIC timer block 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_TIMER_DIGIC_TIMER_H
19#define HW_TIMER_DIGIC_TIMER_H
20
21#include "hw/sysbus.h"
576e99cb 22#include "hw/ptimer.h"
db1015e9 23#include "qom/object.h"
576e99cb
AP
24
25#define TYPE_DIGIC_TIMER "digic-timer"
db1015e9 26typedef struct DigicTimerState DigicTimerState;
8110fa1d
EH
27DECLARE_INSTANCE_CHECKER(DigicTimerState, DIGIC_TIMER,
28 TYPE_DIGIC_TIMER)
576e99cb
AP
29
30#define DIGIC_TIMER_CONTROL 0x00
31#define DIGIC_TIMER_CONTROL_RST 0x80000000
32#define DIGIC_TIMER_CONTROL_EN 0x00000001
33#define DIGIC_TIMER_RELVALUE 0x08
34#define DIGIC_TIMER_VALUE 0x0c
35
db1015e9 36struct DigicTimerState {
576e99cb
AP
37 /*< private >*/
38 SysBusDevice parent_obj;
39 /*< public >*/
40
41 MemoryRegion iomem;
42 ptimer_state *ptimer;
43
44 uint32_t control;
45 uint32_t relvalue;
db1015e9 46};
576e99cb
AP
47
48#endif /* HW_TIMER_DIGIC_TIMER_H */