2 * TOD (Time Of Day) clock
4 * Copyright 2018 Red Hat, Inc.
5 * Author(s): David Hildenbrand <david@redhat.com>
7 * This work is licensed under the terms of the GNU GPL, version 2 or later.
8 * See the COPYING file in the top-level directory.
16 typedef struct S390TOD
{
21 #define TYPE_S390_TOD "s390-tod"
22 #define S390_TOD(obj) OBJECT_CHECK(S390TODState, (obj), TYPE_S390_TOD)
23 #define S390_TOD_CLASS(oc) OBJECT_CLASS_CHECK(S390TODClass, (oc), \
25 #define S390_TOD_GET_CLASS(obj) OBJECT_GET_CLASS(S390TODClass, (obj), \
27 #define TYPE_KVM_S390_TOD TYPE_S390_TOD "-kvm"
28 #define TYPE_QEMU_S390_TOD TYPE_S390_TOD "-qemu"
30 typedef struct S390TODState
{
32 DeviceState parent_obj
;
35 typedef struct S390TODClass
{
37 DeviceClass parent_class
;
40 void (*get
)(const S390TODState
*td
, S390TOD
*tod
, Error
**errp
);
41 void (*set
)(S390TODState
*td
, const S390TOD
*tod
, Error
**errp
);
44 void s390_init_tod(void);