allwinner-cpucfg.c (d328fef93ae757a0dd65ed786a4086e27952eef3) | allwinner-cpucfg.c (e3d0814368d00e7985c31edf5d0cfce45972d4be) |
---|---|
1/* 2 * Allwinner CPU Configuration Module emulation 3 * 4 * Copyright (C) 2019 Niek Linnenbank <nieklinnenbank@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 --- 248 unchanged lines hidden (view full) --- 257 VMSTATE_END_OF_LIST() 258 } 259}; 260 261static void allwinner_cpucfg_class_init(ObjectClass *klass, void *data) 262{ 263 DeviceClass *dc = DEVICE_CLASS(klass); 264 | 1/* 2 * Allwinner CPU Configuration Module emulation 3 * 4 * Copyright (C) 2019 Niek Linnenbank <nieklinnenbank@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 --- 248 unchanged lines hidden (view full) --- 257 VMSTATE_END_OF_LIST() 258 } 259}; 260 261static void allwinner_cpucfg_class_init(ObjectClass *klass, void *data) 262{ 263 DeviceClass *dc = DEVICE_CLASS(klass); 264 |
265 dc->reset = allwinner_cpucfg_reset; | 265 device_class_set_legacy_reset(dc, allwinner_cpucfg_reset); |
266 dc->vmsd = &allwinner_cpucfg_vmstate; 267} 268 269static const TypeInfo allwinner_cpucfg_info = { 270 .name = TYPE_AW_CPUCFG, 271 .parent = TYPE_SYS_BUS_DEVICE, 272 .instance_init = allwinner_cpucfg_init, 273 .instance_size = sizeof(AwCpuCfgState), 274 .class_init = allwinner_cpucfg_class_init, 275}; 276 277static void allwinner_cpucfg_register(void) 278{ 279 type_register_static(&allwinner_cpucfg_info); 280} 281 282type_init(allwinner_cpucfg_register) | 266 dc->vmsd = &allwinner_cpucfg_vmstate; 267} 268 269static const TypeInfo allwinner_cpucfg_info = { 270 .name = TYPE_AW_CPUCFG, 271 .parent = TYPE_SYS_BUS_DEVICE, 272 .instance_init = allwinner_cpucfg_init, 273 .instance_size = sizeof(AwCpuCfgState), 274 .class_init = allwinner_cpucfg_class_init, 275}; 276 277static void allwinner_cpucfg_register(void) 278{ 279 type_register_static(&allwinner_cpucfg_info); 280} 281 282type_init(allwinner_cpucfg_register) |