msf2-sysreg.c (95a9457fd44ad97c518858a4e1586a5498f9773c) msf2-sysreg.c (4f67d30b5e74e060b8dbe10528829b47345cd6e8)
1/*
2 * System Register block model of Microsemi SmartFusion2.
3 *
4 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 129 unchanged lines hidden (view full) ---

138}
139
140static void msf2_sysreg_class_init(ObjectClass *klass, void *data)
141{
142 DeviceClass *dc = DEVICE_CLASS(klass);
143
144 dc->vmsd = &vmstate_msf2_sysreg;
145 dc->reset = msf2_sysreg_reset;
1/*
2 * System Register block model of Microsemi SmartFusion2.
3 *
4 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 129 unchanged lines hidden (view full) ---

138}
139
140static void msf2_sysreg_class_init(ObjectClass *klass, void *data)
141{
142 DeviceClass *dc = DEVICE_CLASS(klass);
143
144 dc->vmsd = &vmstate_msf2_sysreg;
145 dc->reset = msf2_sysreg_reset;
146 dc->props = msf2_sysreg_properties;
146 device_class_set_props(dc, msf2_sysreg_properties);
147 dc->realize = msf2_sysreg_realize;
148}
149
150static const TypeInfo msf2_sysreg_info = {
151 .name = TYPE_MSF2_SYSREG,
152 .parent = TYPE_SYS_BUS_DEVICE,
153 .class_init = msf2_sysreg_class_init,
154 .instance_size = sizeof(MSF2SysregState),
155 .instance_init = msf2_sysreg_init,
156};
157
158static void msf2_sysreg_register_types(void)
159{
160 type_register_static(&msf2_sysreg_info);
161}
162
163type_init(msf2_sysreg_register_types)
147 dc->realize = msf2_sysreg_realize;
148}
149
150static const TypeInfo msf2_sysreg_info = {
151 .name = TYPE_MSF2_SYSREG,
152 .parent = TYPE_SYS_BUS_DEVICE,
153 .class_init = msf2_sysreg_class_init,
154 .instance_size = sizeof(MSF2SysregState),
155 .instance_init = msf2_sysreg_init,
156};
157
158static void msf2_sysreg_register_types(void)
159{
160 type_register_static(&msf2_sysreg_info);
161}
162
163type_init(msf2_sysreg_register_types)