summaryrefslogtreecommitdiff
path: root/hw/timer
AgeCommit message (Collapse)AuthorFilesLines
2013-12-17hw/timer: add allwinner a10 timerliguang2-0/+256
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1387159292-10436-3-git-send-email-lig.fnst@cn.fujitsu.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-17hw/arm/digic: add timer supportAntony Pavlov2-0/+164
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1387188908-754-4-git-send-email-antonynpavlov@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-13Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori1-10/+19
acpi.pci,pc,memory core fixes Most notably this includes changes to exec to support full 64 bit addresses. This also flushes out patches that got queued during 1.7 freeze. There are new tests, and a bunch of bug fixes all over the place. There are also some changes mostly useful for downstreams. I'm also listing myself as pc co-maintainer. I'm doing this reluctantly, but this seems to be necessary to make sure patches are not lost or delayed too much, and posting the MAINTAINERS patch did not seem to make anyone else volunteer. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 11 Dec 2013 10:21:51 AM PST using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin (14) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: (28 commits) pc: use macro for HPET type hpet: fix build with CONFIG_HPET off acpi unit-test: adjust the test data structure for better handling acpi unit-test: load and check facs table exec: separate sections and nodes per address space memory.c: bugfix - ref counting mismatch in memory_region_find hpet: enable to entitle more irq pins for hpet hpet: inverse polarity when pin above ISA_NUM_IRQS pci: fix pci bridge fw path ACPI DSDT: Make control method `IQCR` serialized acpi: strip compiler info in built-in DSDT acpi unit-test: verify signature and checksum smbios: Set system manufacturer, product & version by default exec: reduce L2_PAGE_SIZE exec: make address spaces 64-bit wide exec: memory radix tree page level compression exec: pass hw address to phys_page_find exec: extend skip field to 6 bit, page entry to 32 bit exec: replace leaf with skip split definitions for exec.c and translate-all.c radix trees ... Message-id: cover.1386786228.git.mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-11hpet: fix build with CONFIG_HPET offMichael S. Tsirkin1-6/+0
make hpet_find inline so we don't need to build hpet.c to check if hpet is enabled. Fixes link error with CONFIG_HPET off. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-11hpet: enable to entitle more irq pins for hpetLiu Ping Fan1-2/+7
Owning to some different hardware design, piix and q35 need different compat. So making them diverge. On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 can be assigned to hpet as guest chooses. So we introduce intcap property to do that. Consider the compat and piix/q35, we finally have the following value for intcap: For piix, hpet's intcap is hard coded as IRQ2. For pc-q35-1.7 and earlier, we use IRQ2 for compat reason. Otherwise IRQ2, IRQ8, and IRQ16~23 are allowed. Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-11hpet: inverse polarity when pin above ISA_NUM_IRQSLiu Ping Fan1-2/+12
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line. (On bare metal, if OS driver claims high active on this line, spurious irq is generated) We fold the emulation of this inversion inside the hpet logic. Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-10hw/timer: Introduce ARM A9 Global Timer.Peter Crosthwaite2-0/+370
The ARM A9 MPCore has a timer that is global to all cores in the cluster. The timer is shared but each core has a private independent comparator and interrupt. Based on version contributed by Francois LEGAL. Signed-off-by: François LEGAL <devel@thom.fr.eu.org> Message-id: 4918e89476b8da916be2964ec41578b50d569a37.1385969450.git.peter.crosthwaite@xilinx.com [PC changes: * New commit message * Re-implemented as single timer model * Fixed backwards counting issue in polled mode * completed VMSD fields * macroified magic numbers (and headerified reg definitions) * split of as device-model-only patch * use bitops for 64 bit register access * Fixed auto increment mode to check condition properly * general cleanup (names/style etc). ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [PMM: * minor typo fixes * added missing return after error_setg() * dropped setting dc->no_user = 1 ] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-02misc: Replace 'struct QEMUTimer' by 'QEMUTimer'Stefan Weil1-2/+2
Most code already used QEMUTimer without the redundant 'struct' keyword. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-11-05rtc: remove dead SQW IRQ codeJan Kiszka1-8/+1
This was once introduced by commit 100d9891d6 but was never used in-tree and then got broken by commit 32e0c8260d. Time to clean up. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Message-id: 520B6A27.4040207@siemens.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-11-05a9mpcore: Embed ARMMPTimerStateAndreas Färber1-31/+4
Prepares for QOM realize. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-11-05arm_mptimer: Convert to QOM realizeAndreas Färber1-10/+15
Split the SysBusDevice initfn into instance_init and realizefn. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-10-14hpet: add API to find itMichael S. Tsirkin1-0/+5
Add API to find HPET using QOM. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-01misc: Fix some typos in names and commentsStefan Weil1-2/+2
Most typos were found using a modified version of codespell: accross -> across issueing -> issuing TICNT_THRESHHOLD -> TICNT_THRESHOLD bandwith -> bandwidth VCARD_7816_PROPIETARY -> VCARD_7816_PROPRIETARY occured -> occurred gaurantee -> guarantee sofware -> software Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-08-22aio / timers: Switch entire codebase to the new timer APIAlex Bligh15-96/+96
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22aio / timers: Convert rtc_clock to be a QEMUClockTypeAlex Bligh4-25/+28
Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22aio / timers: Untangle include filesAlex Bligh11-0/+12
include/qemu/timer.h has no need to include main-loop.h and doing so causes an issue for the next patch. Unfortunately various files assume including timers.h will pull in main-loop.h. Untangle this mess. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22aio / timers: Rename qemu_timer_* functionsAlex Bligh1-3/+3
Rename four functions in preparation for new API. Rename qemu_timer_expired to timer_expired Rename qemu_timer_expire_time_ns to timer_expire_time_ns Rename qemu_timer_pending to timer_pending Rename qemu_timer_expired_ns to timer_expired_ns Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-20hw/timer/imx_epit: Simplify and fix imx_epit implementationPeter Chubb1-58/+36
When imx_epit.c was last refactored, a common usecase (comparison register zero) broke. This patch fixes that, and simplifies the code yet more. It also fixes a major thinko in the reset path --- the wrong bits in the control register were being cleared. Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au> Reviewed-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-29xilinx_timer: QOM cast cleanupAndreas Färber1-3/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29tusb6010: QOM cast cleanupAndreas Färber1-10/+16
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29slavio_timer: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29pxa2xx_timer: QOM'ify pxa25x-timer and pxa27x-timerAndreas Färber1-13/+29
Introduce type constant for new abstract base type, use QOM casts and let both non-abstract types inherit from the new base type. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29puv3_ost: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29pl031: QOM cast cleanupAndreas Färber1-3/+7
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29pl031: Rename pl031_state to PL031StateAndreas Färber1-18/+18
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29milkymist-sysctl: QOM cast cleanupAndreas Färber1-5/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29m48t59: QOM cast cleanup for M48t59SysBusStateAndreas Färber1-6/+10
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29lm32_timer: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29grlib_gptimer: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29exynos4210_rtc: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29exynos4210_pwm: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29exynos4210_mct: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29etraxfs_timer: QOM cast cleanupAndreas Färber1-3/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29etraxfs_timer: Rename etrax_timer to ETRAXTimerStateAndreas Färber1-13/+13
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29cadence_ttc: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_timer: QOM cast cleanup for icp_pit_stateAndreas Färber1-3/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_timer: QOM cast cleanup for SP804StateAndreas Färber1-7/+12
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_timer: Rename sp804_state to SP804StateAndreas Färber1-10/+10
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29timer/arm_mptimer: QOM cast cleanupAndreas Färber1-5/+13
Introduce type constant and cast macro and rename ARMMPTimerState::busdev to enforce its use. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-07-23hpet: Use QOM realize for hpetHu Tao1-13/+19
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Avoided SYS_BUS_DEVICE() in loop] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23hpet: QOM'ify some moreHu Tao1-6/+13
Introduce type constant, avoid FROM_SYSBUS(). Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Renamed parent field and renamed variable] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23hw: Avoid use of QOM type name macros in VMStateDescriptionsPeter Maydell2-2/+2
The name field in a VMStateDescription is part of the migration state versioning, so changing it will break migration. It's therefore a bad idea to use a QOM typename macro to initialize it, because in general we're free to rename QOM types as part of code refactoring and cleanup. For the handful of devices that were doing this by mistake, replace the QOM typenames with the corresponding literal strings. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> [AF: Use TYPE_PVSCSI for TypeInfo instead] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-09timer/arm_mptimer: Build arm_mptimer only onceAndreas Färber2-1/+2
Since current_cpu is CPUState it no longer depends on CPUARMState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-09cpu: Replace cpu_single_env with CPUState current_cpuAndreas Färber1-5/+3
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-04hw/t*: pass owner to memory_region_init* functionsPaolo Bonzini22-30/+39
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini25-31/+31
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-25i.MX: Rework functions/types name and use new style initializationJean-Christophe DUBOIS1-87/+84
* use dynamic cast whenever possible * Change function names to some more meaningful prefix * Change type names to a more meaningful one * use new style device initialization Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Message-id: 1369898943-1993-3-git-send-email-jcd@tribudubois.net Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-25i.MX: Implement a more complete version of the GPT timer.Jean-Christophe DUBOIS1-174/+269
* implement compare 1 2 and 3 registers * simplify Debug printf Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Message-id: 1369898943-1993-2-git-send-email-jcd@tribudubois.net Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-07i8254: Convert PITCommonState to QOM realizefnAndreas Färber2-13/+19
Instead of having the parent provide PITCommonClass::init, let the children override DeviceClass::realize themselves. This pushes the responsibility for saving and calling the parent's realizefn to the children. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07i8254: QOM'ify some moreAndreas Färber1-2/+2
Introduce type constant and avoid DO_UPCAST(). Prepares for PIT realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>