aboutsummaryrefslogtreecommitdiffstats
path: root/hw/etraxfs_timer.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-15qom: Unify type registrationAndreas Färber1-2/+2
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-5/+6
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27sysbus: apic: ioapic: convert to QEMU Object ModelAnthony Liguori1-2/+14
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-13ptimer: move declarations to ptimer.hPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()Avi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02etrax-timer: Convert to MemoryRegionEdgar E. Iglesias1-15/+16
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-03-21change all other clock references to use nanosecond resolution accessorsPaolo Bonzini1-1/+1
This was done with: sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. There was exactly one false positive in qemu_run_timers: - current_time = qemu_get_clock (clock); + current_time = qemu_get_clock_ns (clock); which is of course not in this patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-01-26etrax: Dont decrease the granularity of timersEdgar E. Iglesias1-4/+0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-12-11Add endianness as io mem parameterAlexander Graf1-1/+2
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-2/+2
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc1-2/+2
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-08-27qdev: add return value to init() callbacks.Gerd Hoffmann1-1/+2
Sorry folks, but it has to be. One more of these invasive qdev patches. We have a serious design bug in the qdev interface: device init callbacks can't signal failure because the init() callback has no return value. This patch fixes it. We have already one case in-tree where this is needed: Try -device virtio-blk-pci (without drive= specified) and watch qemu segfault. This patch fixes it. With usb+scsi being converted to qdev we'll get more devices where the init callback can fail for various reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-25Make CPURead/WriteFunc structure 'const'Blue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-29Revert "Introduce reset notifier order"Jan Kiszka1-1/+1
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and updates later added users of qemu_register_reset), we solved the problem it originally addressed less invasively. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Remove io_index argument from cpu_register_io_memory()Avi Kivity1-1/+1
The parameter is always zero except when registering the three internal io regions (ROM, unassigned, notdirty). Remove the parameter to reduce the API's power, thus facilitating future change. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-23ETRAX: Removed unused struct entry and fixed Windows build.Stefan Weil1-1/+0
"struct timeval last" caused a compilation error with mingw32 (missing header for struct timeval). It is unused, so it was possible to remove it. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2009-05-22Introduce reset notifier orderJan Kiszka1-1/+1
Add the parameter 'order' to qemu_register_reset and sort callbacks on registration. On system reset, callbacks with lower order will be invoked before those with higher order. Update all existing users to the standard order 0. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-16ETRAX-TIMER: qdevify.Edgar E. Iglesias1-30/+32
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16ETRAX-TIMER: Untabify.Edgar E. Iglesias1-229/+229
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05ETRAX: Simplify interrupt signaling.Edgar E. Iglesias1-4/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-02-22CRIS: Fix remaining build warnings.edgar_igl1-0/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6638 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori1-2/+0
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07ETRAX: Support timer count reads and correct frequencies.edgar_igl1-26/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6206 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-19ETRAX: Correct the frequency of the free-running counter.edgar_igl1-1/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6101 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-01Change MMIO callbacks to use offsets, not absolute addresses.pbrook1-6/+0
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30Avoid refering to CRIS specific cpu-state to be able to use these blocks ↵edgar_igl1-9/+7
with other cores. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4806 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30Avoid CRIS related warnings by Jan Kiszka.edgar_igl1-5/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4804 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09ETRAX: Add NMI support to the watchdog and the interrupt controller.edgar_igl1-4/+25
* Add NMI and GURU exceptions to teh interrupt controller. * Teach the watchdog timer to signal an NMI before reseting the chip. * Add etraxfs.h to hold api for etrax device models. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4720 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-06Compile with debug.edgar_igl1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4677 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-27ETRAX: Allow boot from flash. Support the watchdog timer and resets through it.edgar_igl1-25/+108
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4592 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-11Correct interrupt masking for etrax timers.edgar_igl1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4427 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-06Disable the temporary timer slowdown for etrax.edgar_igl1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4364 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-02Avoid a build warning.edgar_igl1-1/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4303 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-02ETRAX timers: Improve the support for timer1 and let the board-setup choose ↵edgar_igl1-65/+54
irq nr. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4301 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-14Made the etrax timers and serial-ports base address relocatable. Use ↵edgar_igl1-86/+65
target_phys_addr_t instead of target_ulong. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4058 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-14* Add a model of the ETRAX interrupt controller.edgar_igl1-24/+24
* Clean up the interrupt handling a bit. * Connect some NOR flash to the test board. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4055 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-01* target-cris/op.c: Make sure the bit-test insn only updates the XNZ flags.edgar_igl1-35/+61
* target-cris/helper.c: Update ERP for user-mode simulation aswell. * hw/etraxfs_timer.c: Support multiple timers. * hw/etraxfs_ser.c: Multiple ports, the data just goes to stdout. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4004 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17Break up vl.h.pbrook1-1/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08EtraxFS board support, by Edgar E. Iglesias.ths1-0/+268
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3364 c046a42c-6fe2-441c-8c8c-71466251a162