bad76ac319
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging
...
Fix typos and docs, trivial changes and RTC devices split
# gpg: Signature made Fri 25 Oct 2019 09:35:02 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-branch-pull-request:
hw/rtc/aspeed_rtc: Remove unused includes
hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less
hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
hw/timer: Compile devices not target-dependent as common object
qemu-timer: reuse MIN macro in qemu_timeout_ns_to_ms
event_notifier: avoid dandling file descriptor in event_notifier_cleanup
util/async: avoid useless cast
pci_bridge: fix a typo in comment
qemu-options.hx: Update for reboot-timeout parameter
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
# Conflicts:
# hw/timer/trace-events
2019-10-25 14:17:08 +01:00
d05be883fc
hw/timer/bcm2835: Add the BCM2835 SYS_timer
...
Add the 64-bit free running timer. Do not model the COMPARE register
(no IRQ generated).
This timer is used by Linux kernel and recently U-Boot:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clocksource/bcm2835_timer.c?h=v3.7
https://github.com/u-boot/u-boot/blob/v2019.07/include/configs/rpi.h#L19
Datasheet used:
https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20191019234715.25750-4-f4bug@amsat.org
[PMM: squashed in switch to using memset in reset]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2019-10-25 13:09:27 +01:00
ea5dcf4e1d
hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Cédric Le Goater <clg@kaod.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-12-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:31:44 +02:00
7f0df1ccdf
hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-11-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:29:18 +02:00
8035f85ef3
hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Remove Alistair outdated email address (see commit c22e580c2a
).
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-10-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:28:01 +02:00
64e85ffde8
hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
...
The DS1338 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-9-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:26:35 +02:00
6a648a5f23
hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
...
The TWL92230 is an "energy management device" companion with
a RTC. Since we mostly model the RTC, move it under the hw/rtc/
subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-8-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:24:50 +02:00
2811ac3059
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com >
Message-Id: <20191003230404.19384-7-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:23:15 +02:00
de04c31d31
hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
...
The M41T80 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-6-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:22:12 +02:00
819ce6b2a5
hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
...
The M48T59 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-5-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:20:45 +02:00
bcdb90640a
hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
...
The MC146818 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Use copyright statement from 80cabfad16
for "hw/rtc/mc146818rtc.h".
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: David Gibson <david@gibson.dropbear.id.au >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-4-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:13:10 +02:00
877c181cd4
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
...
The PL031 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-3-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:10:27 +02:00
2baa483bb7
hw/timer: Compile devices not target-dependent as common object
...
All these devices do not contain any target-specific. While most
of them are arch-specific, they are shared between different
targets of the same arch family (ARM and AArch64, MIPS32/MIPS64,
endianess, ...).
Put them into common-obj-y to compile them once for all targets.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Thomas Huth <thuth@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-2-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:10:27 +02:00
979672cf51
hw: timer: Add ASPEED RTC device
...
The RTC is modeled to provide time and date functionality. It is
initialised at zero to match the hardware.
There is no modelling of the alarm functionality, which includes the IRQ
line. As there is no guest code to exercise this function that is
acceptable for now.
Signed-off-by: Joel Stanley <joel@jms.id.au >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20190618165311.27066-4-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2019-07-01 17:28:59 +01:00
c5a4829c08
hw/timer/nrf51_timer: Add nRF51 Timer peripheral
...
This patch adds the model for the nRF51 timer peripheral.
Currently, only the TIMER mode is implemented.
Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de >
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-id: 20190103091119.9367-9-stefanha@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2019-01-07 15:23:47 +00:00
4f4c6206ca
hw/timer/cmsdk-apb-dualtimer: Implement CMSDK dual timer module
...
The Arm Cortex-M System Design Kit includes a "dual-input timer module"
which combines two programmable down-counters. Implement a model
of this device.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180820141116.9118-4-peter.maydell@linaro.org
2018-08-24 13:17:41 +01:00
c6f2594c4b
hw/timer: Add basic M41T80 emulation
...
Basic emulation of the M41T80 serial (I2C) RTC chip. Only getting time
of day is implemented. Setting time and RTC alarm are not supported.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Cédric Le Goater <clg@kaod.org >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2018-07-03 09:56:52 +10:00
07664ca68b
xlnx-zynqmp-rtc: Initial commit
...
Initial commit of the ZynqMP RTC device.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-03-02 10:45:34 +00:00
96401bad45
msf2: Add Smartfusion2 System timer
...
Modelled System Timer in Microsemi's Smartfusion2 Soc.
Timer has two 32bit down counters and two interrupts.
Signed-off-by: Subbaraya Sundeep <sundeep.lkml@gmail.com >
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com >
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-id: 20170920201737.25723-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2017-09-21 16:36:56 +01:00
5dd85b4b48
hw/char/cmsdk-apb-timer: Implement CMSDK APB timer device
...
Implement a model of the simple timer device found in the CMSDK.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-id: 1500029487-14822-5-git-send-email-peter.maydell@linaro.org
2017-07-17 13:36:08 +01:00
ff68dacbc7
armv7m: Split systick out from NVIC
...
The SysTick timer isn't really part of the NVIC proper;
we just modelled it that way back when we couldn't
easily have devices that only occupied a small chunk
of a memory region. Split it out into its own device.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 1487604965-23220-10-git-send-email-peter.maydell@linaro.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
2017-02-28 16:18:49 +00:00
c124c4d13b
Split ISA and sysbus versions of m48t59 device
...
The m48t59 device supports both ISA and direct sysbus attached versions of
the device in the one .c file. This can be awkward for some embedded
machine types which need the sysbus M48T59, but don't want to pull in the
ISA bus code and its other dependencies.
Therefore, this patch splits out the code for the ISA attached M48T59 into
its own C file. It will be built when both CONFIG_M48T59 and
CONFIG_ISA_BUS are enabled.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
2017-02-06 12:33:21 +11:00
a32a225357
nios2: Add periodic timer emulation
...
Add the Altera timer model.
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Chris Wulff <crwulff@gmail.com >
Cc: Jeff Da Silva <jdasilva@altera.com >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Sandra Loosemore <sandra@codesourcery.com >
Cc: Yves Vandervennet <yvanderv@altera.com >
Reviewed-by: Alexander Graf <agraf@suse.de >
Message-Id: <20170118220146.489-6-marex@denx.de >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2017-01-24 13:10:35 -08:00
a0e893039c
target-sparc: implement sun4v RTC
...
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com >
2017-01-18 22:03:44 +01:00
405140519f
hw/mips: implement GIC Interval Timer
...
The interval timer is similar to the CP0 Count/Compare timer within
each processor. The difference is the GIC_SH_COUNTER register is global
to the system so that all processors have the same time reference.
To ease implementation, all VPs are having its own QEMU timer but sharing
global settings and registers such as GIC_SH_CONFIG.COUTNSTOP and
GIC_SH_COUNTER.
MIPS GIC Interval Timer does support upto 64 bits of Count register but
in this implementation it is limited to 32 bits only.
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com >
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com >
2016-07-12 09:10:09 +01:00
c04bd47db6
hw/timer: Add ASPEED timer device model
...
Implement basic ASPEED timer functionality for the AST2400 SoC[1]: Up to
8 timers can independently be configured, enabled, reset and disabled.
Some hardware features are not implemented, namely clock value matching
and pulse generation, but the implementation is enough to boot the Linux
kernel configured with aspeed_defconfig.
[1] http://www.aspeedtech.com/products.php?fPath=20&rId=376
Signed-off-by: Andrew Jeffery <andrew@aj.id.au >
Message-id: 1458096317-25223-2-git-send-email-andrew@aj.id.au
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2016-03-16 17:42:18 +00:00
14ec7b2c5b
tusb6010: move from hw/timer to hw/usb
...
The TUSB6010 is a USB controller (as the name suggests). Move it from
hw/timer (where it was accidentally filed in 2013 when we moved
everything out of hw/) to hw/usb.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 1455883404-10976-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2016-02-23 10:38:00 +01:00
be28470514
stm32f2xx_timer: Add the stm32f2xx Timer
...
This patch adds the stm32f2xx timers: TIM2, TIM3, TIM4 and TIM5
to QEMU.
Signed-off-by: Alistair Francis <alistair@alistair23.me >
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com >
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com >
Message-id: 155091a323390f8da3cca496e4c611c493e62a77.1424175342.git.alistair@alistair23.me
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2015-03-11 13:21:05 +00:00
3589de8c97
hw/timer: add allwinner a10 timer
...
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-17 20:12:51 +00:00
576e99cb95
hw/arm/digic: add timer support
...
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-17 20:12:51 +00:00
c21c3b53e1
hw/timer: Introduce ARM A9 Global Timer.
...
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-10 13:24:51 +00:00
de6db419e5
timer/arm_mptimer: Build arm_mptimer only once
...
Since current_cpu is CPUState it no longer depends on CPUARMState.
Signed-off-by: Andreas Färber <afaerber@suse.de >
2013-07-09 21:33:02 +02:00
a50c0d6f72
i.MX: split GPT and EPIT timer implementation
...
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 >
2013-06-03 17:17:45 +01:00
3bd884511f
hw: move timer devices to hw/timer/, configure with default-configs/
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2013-04-08 18:13:14 +02:00
0ddfaf7fe4
hw: move MC146818RTC to hw/timer/, configure via default-configs/
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2013-04-08 18:13:13 +02:00
49ab747f66
hw: move target-independent files to subdirectories
...
This patch tackles all files that are compiled once, moving
them to subdirectories of hw/.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2013-04-08 18:13:12 +02:00
1fd6bb44ed
hw: make subdirectories for devices
...
Prepare the new directory structure.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2013-04-08 18:13:11 +02:00