summaryrefslogtreecommitdiffstats
path: root/hw/timer
Commit message (Collapse)AuthorAgeFilesLines
* hw/timer/imx_epit: Simplify and fix imx_epit implementationPeter Chubb2013-08-201-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>
* xilinx_timer: QOM cast cleanupAndreas Färber2013-07-291-3/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* tusb6010: QOM cast cleanupAndreas Färber2013-07-291-10/+16
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* slavio_timer: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* pxa2xx_timer: QOM'ify pxa25x-timer and pxa27x-timerAndreas Färber2013-07-291-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>
* puv3_ost: QOM cast cleanupAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* pl031: QOM cast cleanupAndreas Färber2013-07-291-3/+7
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* pl031: Rename pl031_state to PL031StateAndreas Färber2013-07-291-18/+18
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* milkymist-sysctl: QOM cast cleanupAndreas Färber2013-07-291-5/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* m48t59: QOM cast cleanup for M48t59SysBusStateAndreas Färber2013-07-291-6/+10
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* lm32_timer: QOM cast cleanupAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* grlib_gptimer: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exynos4210_rtc: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exynos4210_pwm: QOM cast cleanupAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exynos4210_mct: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* etraxfs_timer: QOM cast cleanupAndreas Färber2013-07-291-3/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* etraxfs_timer: Rename etrax_timer to ETRAXTimerStateAndreas Färber2013-07-291-13/+13
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* cadence_ttc: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* arm_timer: QOM cast cleanup for icp_pit_stateAndreas Färber2013-07-291-3/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* arm_timer: QOM cast cleanup for SP804StateAndreas Färber2013-07-291-7/+12
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* arm_timer: Rename sp804_state to SP804StateAndreas Färber2013-07-291-10/+10
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* timer/arm_mptimer: QOM cast cleanupAndreas Färber2013-07-291-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>
* hpet: Use QOM realize for hpetHu Tao2013-07-231-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>
* hpet: QOM'ify some moreHu Tao2013-07-231-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>
* hw: Avoid use of QOM type name macros in VMStateDescriptionsPeter Maydell2013-07-232-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>
* timer/arm_mptimer: Build arm_mptimer only onceAndreas Färber2013-07-092-1/+2
| | | | | | Since current_cpu is CPUState it no longer depends on CPUARMState. Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Replace cpu_single_env with CPUState current_cpuAndreas Färber2013-07-091-5/+3
| | | | | | Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
* hw/t*: pass owner to memory_region_init* functionsPaolo Bonzini2013-07-0422-30/+39
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-0425-31/+31
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* i.MX: Rework functions/types name and use new style initializationJean-Christophe DUBOIS2013-06-251-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>
* i.MX: Implement a more complete version of the GPT timer.Jean-Christophe DUBOIS2013-06-251-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>
* i8254: Convert PITCommonState to QOM realizefnAndreas Färber2013-06-072-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>
* i8254: QOM'ify some moreAndreas Färber2013-06-071-2/+2
| | | | | | | | Introduce type constant and avoid DO_UPCAST(). Prepares for PIT realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
* isa: Use realizefn for ISADeviceAndreas Färber2013-06-073-26/+29
| | | | | | | | Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
* i.MX: Improve EPIT timer code.Jean-Christophe DUBOIS2013-06-031-104/+132
| | | | | | | | | | | | * Unify function and type naming * use dynamic cast whenever possible * simplify Debug printf. * use new style device intialization. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au> Message-id: 1369839656-24466-1-git-send-email-jcd@tribudubois.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* i.MX: split GPT and EPIT timer implementationJean-Christophe DUBOIS2013-06-033-363/+410
| | | | | | | | | There is no common code between these 2 timer implementation. So it is better to split them. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Message-id: 1368990197-19694-1-git-send-email-jcd@tribudubois.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Remove unnecessary break statementsStefan Weil2013-06-011-1/+0
| | | | | | | | | | | | | | | | | Fix these warnings from cppcheck: hw/display/cirrus_vga.c:2603: hw/sd/sd.c:348: hw/timer/exynos4210_mct.c:1033: target-arm/translate.c:9886: target-s390x/mem_helper.c:518: target-unicore32/translate.c:1936: style: Consecutive return, break, continue, goto or throw statements are unnecessary. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* remove some double-includesMichael Tokarev2013-05-181-1/+0
| | | | | | | | Some source files #include the same header more than once for no good reason. Remove second #includes in such cases. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* i.MX: implement a more correct version of EPIT timer.Jean-Christophe DUBOIS2013-05-031-64/+198
| | | | | | | | | | | | | This patch is providing a complete version of the EPIT timer. Note, however that the GPT timer in the same file is still not complete. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Message-id: 1365624982-15647-1-git-send-email-jcd@tribudubois.net Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au> [PMM: wrapped an overly long line] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* pc: Update rtc_cmos on CPU hot-plugIgor Mammedov2013-05-011-0/+7
| | | | | | | It provides updated currently available CPUs count to BIOS on reboot. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* mc146818rtc: QOM'ifyAndreas Färber2013-04-291-16/+20
| | | | | | | | | | | | Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-9-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* m48t59: QOM'ify ISA M48T59 NVRAMAndreas Färber2013-04-291-14/+21
| | | | | | | | | | | | Introduce type constant and cast macro to obsolete DO_UPCAST() and container_of(). Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-8-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* arm: fix location of some include filesPeter Maydell2013-04-151-1/+1
| | | | | | | | | | | The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/ Move these two headers to correct this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move timer devices to hw/timer/, configure with default-configs/Paolo Bonzini2013-04-0816-0/+7587
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move MC146818RTC to hw/timer/, configure via default-configs/Paolo Bonzini2013-04-082-0/+915
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move target-independent files to subdirectoriesPaolo Bonzini2013-04-0812-0/+4898
| | | | | | | This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: make subdirectories for devicesPaolo Bonzini2013-04-081-0/+0
Prepare the new directory structure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud