[PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device

Hao Wu via posted 4 patches 3 years, 1 month ago
Test checkpatch failed
Failed in applying to current master (apply log)
docs/system/arm/nuvoton.rst    |   2 +-
hw/arm/npcm7xx.c               |  45 ++-
hw/arm/npcm7xx_boards.c        |  99 ++++++
hw/misc/meson.build            |   1 +
hw/misc/npcm7xx_mft.c          | 541 +++++++++++++++++++++++++++++++++
hw/misc/npcm7xx_pwm.c          |   4 +
hw/misc/trace-events           |   8 +
include/hw/arm/npcm7xx.h       |  13 +-
include/hw/misc/npcm7xx_mft.h  |  70 +++++
include/hw/misc/npcm7xx_pwm.h  |   4 +-
tests/qtest/npcm7xx_pwm-test.c | 205 ++++++++++++-
11 files changed, 975 insertions(+), 17 deletions(-)
create mode 100644 hw/misc/npcm7xx_mft.c
create mode 100644 include/hw/misc/npcm7xx_mft.h
[PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device
Posted by Hao Wu via 3 years, 1 month ago
This patch set implements the Tachometer (a.k.a Multi Functional Timer/MFT)
device in NPCM7XX SoC. This device is used by NPCM7XX boards to measure
the RPM of PWM fans.

To provide the RPM of a certain fan, since RPM = MAX_RPM * duty_percentage.
We convert the duty output in NPCM7XX PWM module into GPIOs and feed them
into the MFT module.

The connection of PWM modules and fan modules are derived from their specific
Linux device trees and coded in hw/arm/npcm7xx_boards.c.

We amend the QTest for the PWM module to include verifying the reading from
the Tachometer is correct.

Hao Wu (4):
  hw/misc: Add GPIOs for duty in NPCM7xx PWM
  hw/misc: Add NPCM7XX MFT Module
  hw/arm: Connect PWM fans in NPCM7XX boards
  tests/qtest: Test PWM fan RPM using MFT in PWM test

 docs/system/arm/nuvoton.rst    |   2 +-
 hw/arm/npcm7xx.c               |  45 ++-
 hw/arm/npcm7xx_boards.c        |  99 ++++++
 hw/misc/meson.build            |   1 +
 hw/misc/npcm7xx_mft.c          | 541 +++++++++++++++++++++++++++++++++
 hw/misc/npcm7xx_pwm.c          |   4 +
 hw/misc/trace-events           |   8 +
 include/hw/arm/npcm7xx.h       |  13 +-
 include/hw/misc/npcm7xx_mft.h  |  70 +++++
 include/hw/misc/npcm7xx_pwm.h  |   4 +-
 tests/qtest/npcm7xx_pwm-test.c | 205 ++++++++++++-
 11 files changed, 975 insertions(+), 17 deletions(-)
 create mode 100644 hw/misc/npcm7xx_mft.c
 create mode 100644 include/hw/misc/npcm7xx_mft.h

-- 
2.30.1.766.gb4fecdf3b7-goog


Re: [PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device
Posted by no-reply@patchew.org 3 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20210305183857.3120188-1-wuhaotsh@google.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210305183857.3120188-1-wuhaotsh@google.com
Subject: [PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20210302175741.1079851-1-richard.henderson@linaro.org -> patchew/20210302175741.1079851-1-richard.henderson@linaro.org
 - [tag update]      patchew/20210305170045.869437-1-kbastian@mail.uni-paderborn.de -> patchew/20210305170045.869437-1-kbastian@mail.uni-paderborn.de
 - [tag update]      patchew/20210305171515.1038-1-peter.maydell@linaro.org -> patchew/20210305171515.1038-1-peter.maydell@linaro.org
 * [new tag]         patchew/20210305183857.3120188-1-wuhaotsh@google.com -> patchew/20210305183857.3120188-1-wuhaotsh@google.com
Switched to a new branch 'test'
7b18101 tests/qtest: Test PWM fan RPM using MFT in PWM test
53799e6 hw/arm: Connect PWM fans in NPCM7XX boards
9226b6d hw/misc: Add NPCM7XX MFT Module
403762a hw/misc: Add GPIOs for duty in NPCM7xx PWM

=== OUTPUT BEGIN ===
1/4 Checking commit 403762a46ae9 (hw/misc: Add GPIOs for duty in NPCM7xx PWM)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Hao Wu via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 38 lines checked

Patch 1/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/4 Checking commit 9226b6d418ca (hw/misc: Add NPCM7XX MFT Module)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Hao Wu via <qemu-devel@nongnu.org>

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#151: 
new file mode 100644

total: 1 errors, 1 warnings, 735 lines checked

Patch 2/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/4 Checking commit 53799e60c166 (hw/arm: Connect PWM fans in NPCM7XX boards)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Hao Wu via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 166 lines checked

Patch 3/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/4 Checking commit 7b1810171de3 (tests/qtest: Test PWM fan RPM using MFT in PWM test)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Hao Wu via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 287 lines checked

Patch 4/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210305183857.3120188-1-wuhaotsh@google.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com