hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor
commit99c641370b52348b2893b2cd19624bf9a416ccfa
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 19 Oct 2019 23:47:00 +0000 (20 01:47 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 25 Oct 2019 12:09:27 +0000 (25 13:09 +0100)
tree7887c78e5a18a157c1248df390facff126094ef0
parent98a44c1603596fcfffdae5dc674932bc923db049
hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor

We will soon implement the SYS_timer. This timer is used by Linux
in the thermal subsystem, so once available, the subsystem will be
enabled and poll the temperature sensors. We need to provide the
minimum required to keep Linux booting.

Add a dummy thermal sensor returning ~25°C based on:
https://github.com/raspberrypi/linux/blob/rpi-5.3.y/drivers/thermal/broadcom/bcm2835_thermal.c

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20191019234715.25750-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/misc/Makefile.objs
hw/misc/bcm2835_thermal.c [new file with mode: 0644]
include/hw/misc/bcm2835_thermal.h [new file with mode: 0644]