aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/meson.build
diff options
context:
space:
mode:
authorHao Wu <wuhaotsh@google.com>2021-03-11 10:08:52 -0800
committerPeter Maydell <peter.maydell@linaro.org>2021-03-12 12:48:56 +0000
commit380a37e49891f8d9462124f593516a9ced58343a (patch)
tree1c84cd2ebbbd97b42c713a58935724a7cf4170ce /hw/misc/meson.build
parent71b50b9d1ca2f5e8ae65678294ceacbd7b6520c8 (diff)
downloadqemu-380a37e49891f8d9462124f593516a9ced58343a.zip
qemu-380a37e49891f8d9462124f593516a9ced58343a.tar.gz
qemu-380a37e49891f8d9462124f593516a9ced58343a.tar.bz2
hw/misc: Add NPCM7XX MFT Module
This patch implements Multi Function Timer (MFT) module for NPCM7XX. This module is mainly used to configure PWM fans. It has just enough functionality to make the PWM fan kernel module work. The module takes two input, the max_rpm of a fan (modifiable via QMP) and duty cycle (a GPIO from the PWM module.) The actual measured RPM is equal to max_rpm * duty_cycle / NPCM7XX_PWM_MAX_DUTY. The RPM is measured as a counter compared to a prescaled input clock. The kernel driver reads this counter and report to user space. Refs: https://github.com/torvalds/linux/blob/master/drivers/hwmon/npcm750-pwm-fan.c Reviewed-by: Doug Evans <dje@google.com> Reviewed-by: Tyrone Ting <kfting@nuvoton.com> Signed-off-by: Hao Wu <wuhaotsh@google.com> Message-id: 20210311180855.149764-3-wuhaotsh@google.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/meson.build')
-rw-r--r--hw/misc/meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/misc/meson.build b/hw/misc/meson.build
index 65b6bb0..7a2b0d0 100644
--- a/hw/misc/meson.build
+++ b/hw/misc/meson.build
@@ -65,6 +65,7 @@ softmmu_ss.add(when: 'CONFIG_MAINSTONE', if_true: files('mst_fpga.c'))
softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files(
'npcm7xx_clk.c',
'npcm7xx_gcr.c',
+ 'npcm7xx_mft.c',
'npcm7xx_pwm.c',
'npcm7xx_rng.c',
))