pmu.c (d2623129a7dec1d3041ad1221dda1ca49c667532) | pmu.c (8e5c952b370b57beb642826882c80e1b66a9cf12) |
---|---|
1/* 2 * QEMU PowerMac PMU device support 3 * 4 * Copyright (c) 2016 Benjamin Herrenschmidt, IBM Corp. 5 * Copyright (c) 2018 Mark Cave-Ayland 6 * 7 * Based on the CUDA device by: 8 * --- 744 unchanged lines hidden (view full) --- 753 qemu_get_timedate(&tm, 0); 754 s->tick_offset = (uint32_t)mktimegm(&tm) + RTC_OFFSET; 755 s->one_sec_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, pmu_one_sec_timer, s); 756 s->one_sec_target = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 1000; 757 timer_mod(s->one_sec_timer, s->one_sec_target); 758 759 if (s->has_adb) { 760 qbus_create_inplace(&s->adb_bus, sizeof(s->adb_bus), TYPE_ADB_BUS, | 1/* 2 * QEMU PowerMac PMU device support 3 * 4 * Copyright (c) 2016 Benjamin Herrenschmidt, IBM Corp. 5 * Copyright (c) 2018 Mark Cave-Ayland 6 * 7 * Based on the CUDA device by: 8 * --- 744 unchanged lines hidden (view full) --- 753 qemu_get_timedate(&tm, 0); 754 s->tick_offset = (uint32_t)mktimegm(&tm) + RTC_OFFSET; 755 s->one_sec_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, pmu_one_sec_timer, s); 756 s->one_sec_target = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 1000; 757 timer_mod(s->one_sec_timer, s->one_sec_target); 758 759 if (s->has_adb) { 760 qbus_create_inplace(&s->adb_bus, sizeof(s->adb_bus), TYPE_ADB_BUS, |
761 DEVICE(dev), "adb.0"); | 761 dev, "adb.0"); |
762 s->adb_poll_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, pmu_adb_poll, s); 763 s->adb_poll_mask = 0xffff; 764 s->autopoll_rate_ms = 20; 765 } 766} 767 768static void pmu_init(Object *obj) 769{ --- 106 unchanged lines hidden --- | 762 s->adb_poll_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, pmu_adb_poll, s); 763 s->adb_poll_mask = 0xffff; 764 s->autopoll_rate_ms = 20; 765 } 766} 767 768static void pmu_init(Object *obj) 769{ --- 106 unchanged lines hidden --- |