qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/19] hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal s


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 08/19] hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor
Date: Mon, 14 Oct 2019 18:05:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/14/19 5:37 PM, Peter Maydell wrote:
On Thu, 26 Sep 2019 at 18:34, Philippe Mathieu-Daudé <address@hidden> wrote:

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é <address@hidden>
---
checkpatch warning:
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
This is OK because the regex are:

   F: hw/*/bcm283*
   F: include/hw/*/bcm283*

+static void bcm2835_thermal_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+
+    dc->realize = bcm2835_thermal_realize;
+}

This is missing the vmsd and reset function.

Ah correct, I forgot about the Bcm2835ThermalState::ctl field.

Thanks!

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]