cuda.c (3d81f594fdcd6c2737a52dcb19552a298f2af9e1) | cuda.c (db873cc5d1a4aaa67eea87768d504b2f89d88738) |
---|---|
1/* 2 * QEMU PowerMac CUDA device support 3 * 4 * Copyright (c) 2004-2007 Fabrice Bellard 5 * Copyright (c) 2007 Jocelyn Mayer 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 17 unchanged lines hidden (view full) --- 26#include "qemu/osdep.h" 27#include "qemu-common.h" 28#include "hw/ppc/mac.h" 29#include "hw/qdev-properties.h" 30#include "migration/vmstate.h" 31#include "hw/input/adb.h" 32#include "hw/misc/mos6522.h" 33#include "hw/misc/macio/cuda.h" | 1/* 2 * QEMU PowerMac CUDA device support 3 * 4 * Copyright (c) 2004-2007 Fabrice Bellard 5 * Copyright (c) 2007 Jocelyn Mayer 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 17 unchanged lines hidden (view full) --- 26#include "qemu/osdep.h" 27#include "qemu-common.h" 28#include "hw/ppc/mac.h" 29#include "hw/qdev-properties.h" 30#include "migration/vmstate.h" 31#include "hw/input/adb.h" 32#include "hw/misc/mos6522.h" 33#include "hw/misc/macio/cuda.h" |
34#include "qapi/error.h" |
|
34#include "qemu/timer.h" 35#include "sysemu/runstate.h" 36#include "qapi/error.h" 37#include "qemu/cutils.h" 38#include "qemu/log.h" 39#include "qemu/module.h" 40#include "trace.h" 41 --- 480 unchanged lines hidden (view full) --- 522 523static void cuda_realize(DeviceState *dev, Error **errp) 524{ 525 CUDAState *s = CUDA(dev); 526 Error *err = NULL; 527 SysBusDevice *sbd; 528 struct tm tm; 529 | 35#include "qemu/timer.h" 36#include "sysemu/runstate.h" 37#include "qapi/error.h" 38#include "qemu/cutils.h" 39#include "qemu/log.h" 40#include "qemu/module.h" 41#include "trace.h" 42 --- 480 unchanged lines hidden (view full) --- 523 524static void cuda_realize(DeviceState *dev, Error **errp) 525{ 526 CUDAState *s = CUDA(dev); 527 Error *err = NULL; 528 SysBusDevice *sbd; 529 struct tm tm; 530 |
530 object_property_set_bool(OBJECT(&s->mos6522_cuda), true, "realized", 531 &err); | 531 sysbus_realize(SYS_BUS_DEVICE(&s->mos6522_cuda), &err); |
532 if (err) { 533 error_propagate(errp, err); 534 return; 535 } 536 537 /* Pass IRQ from 6522 */ 538 sbd = SYS_BUS_DEVICE(s); 539 sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->mos6522_cuda)); --- 9 unchanged lines hidden (view full) --- 549 s->autopoll_rate_ms = 20; 550} 551 552static void cuda_init(Object *obj) 553{ 554 CUDAState *s = CUDA(obj); 555 SysBusDevice *sbd = SYS_BUS_DEVICE(obj); 556 | 532 if (err) { 533 error_propagate(errp, err); 534 return; 535 } 536 537 /* Pass IRQ from 6522 */ 538 sbd = SYS_BUS_DEVICE(s); 539 sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->mos6522_cuda)); --- 9 unchanged lines hidden (view full) --- 549 s->autopoll_rate_ms = 20; 550} 551 552static void cuda_init(Object *obj) 553{ 554 CUDAState *s = CUDA(obj); 555 SysBusDevice *sbd = SYS_BUS_DEVICE(obj); 556 |
557 sysbus_init_child_obj(obj, "mos6522-cuda", &s->mos6522_cuda, 558 sizeof(s->mos6522_cuda), TYPE_MOS6522_CUDA); | 557 object_initialize_child(obj, "mos6522-cuda", &s->mos6522_cuda, 558 TYPE_MOS6522_CUDA); |
559 560 memory_region_init_io(&s->mem, obj, &mos6522_cuda_ops, s, "cuda", 0x2000); 561 sysbus_init_mmio(sbd, &s->mem); 562 563 qbus_create_inplace(&s->adb_bus, sizeof(s->adb_bus), TYPE_ADB_BUS, 564 DEVICE(obj), "adb.0"); 565} 566 --- 70 unchanged lines hidden --- | 559 560 memory_region_init_io(&s->mem, obj, &mos6522_cuda_ops, s, "cuda", 0x2000); 561 sysbus_init_mmio(sbd, &s->mem); 562 563 qbus_create_inplace(&s->adb_bus, sizeof(s->adb_bus), TYPE_ADB_BUS, 564 DEVICE(obj), "adb.0"); 565} 566 --- 70 unchanged lines hidden --- |