pc-testdev.c (d2f5ea9704af781d4cf14e4be08bb4e37a180260) pc-testdev.c (125ee0ed9cad04307498ac2b7b0d51ad8a807360)
1/*
2 * QEMU x86 ISA testdev
3 *
4 * Copyright (c) 2012 Avi Kivity, Gerd Hoffmann, Marcelo Tosatti
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

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

183 memory_region_add_subregion(io, 0x2000, &dev->irq);
184 memory_region_add_subregion(mem, 0xff000000, &dev->iomem);
185}
186
187static void testdev_class_init(ObjectClass *klass, void *data)
188{
189 DeviceClass *dc = DEVICE_CLASS(klass);
190
1/*
2 * QEMU x86 ISA testdev
3 *
4 * Copyright (c) 2012 Avi Kivity, Gerd Hoffmann, Marcelo Tosatti
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

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

183 memory_region_add_subregion(io, 0x2000, &dev->irq);
184 memory_region_add_subregion(mem, 0xff000000, &dev->iomem);
185}
186
187static void testdev_class_init(ObjectClass *klass, void *data)
188{
189 DeviceClass *dc = DEVICE_CLASS(klass);
190
191 set_bit(DEVICE_CATEGORY_MISC, dc->categories);
191 dc->realize = testdev_realizefn;
192}
193
194static const TypeInfo testdev_info = {
195 .name = TYPE_TESTDEV,
196 .parent = TYPE_ISA_DEVICE,
197 .instance_size = sizeof(PCTestdev),
198 .class_init = testdev_class_init,
199};
200
201static void testdev_register_types(void)
202{
203 type_register_static(&testdev_info);
204}
205
206type_init(testdev_register_types)
192 dc->realize = testdev_realizefn;
193}
194
195static const TypeInfo testdev_info = {
196 .name = TYPE_TESTDEV,
197 .parent = TYPE_ISA_DEVICE,
198 .instance_size = sizeof(PCTestdev),
199 .class_init = testdev_class_init,
200};
201
202static void testdev_register_types(void)
203{
204 type_register_static(&testdev_info);
205}
206
207type_init(testdev_register_types)