Skip to content

Additional NPCM7xx devices

Hao Wu via qemu-arm qemu-devel 4 versions – Applied

Status from this message: Applied to target-arm.next with a fixup to the ADC patch for

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 of 6 patches 1 replyApplied
  2. v43 of 6 patches 4 repliesSuperseded
  3. v34 of 5 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v22 of 4 patches1 replySuperseded

Changes in v5 from the cover letter

- Use clock_ticks_to_ns to compute clock time in nanoseconds. (Didn't apply to PWM patch since it requires a frequency as output.)
- Removed reset_timer and resets immediately in ADC patch.
- Removed "qemu/osdep.h" from headers and include them in .c files.
- Use REG32 for register fields.
- Fix a g_assert that a guest can trigger with incorrect input.

5 of 6 patches are in this archive. The cover letter announces 6.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/6hw/misc: Add clock converter in NPCM7XX CLK modulehw/misc/npcm7xx_clk.c include/hw/misc/npcm7xx_clk.h+927 -80 replies
2/6hw/timer: Refactor NPCM7XX Timer to use CLK clockhw/arm/npcm7xx.c hw/timer/npcm7xx_timer.c include/hw/misc/npcm7xx_clk.h +1 more+24 -270 replies
4/6hw/misc: Add a PWM module for NPCM7XXdocs/system/arm/nuvoton.rst hw/arm/npcm7xx.c hw/misc/meson.build +4 more+689 -30 replies
5/6hw/misc: Add QTest for NPCM7XX PWM Moduletests/qtest/meson.build tests/qtest/npcm7xx_pwm-test.c+491 -00 replies
6/6hw/*: Use type casting for SysBusDevice in NPCM7XXhw/arm/npcm7xx_boards.c hw/mem/npcm7xx_mc.c hw/misc/npcm7xx_clk.c +4 more+7 -70 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHavard SkinnemoenTyrone TingPeter Maydell
SeriesR-b R-b
1/6R-b R-b R-b
2/6R-b R-b
4/6R-b R-b
5/6R-b R-b R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/6] Additional NPCM7xx devices

This patch series include a few more NPCM7XX devices including

- Analog Digital Converter (ADC)
- Pulse Width Modulation (PWM)

We also modified the CLK module to generate clock values using qdev_clock. These clocks are used to determine various clocks in NPCM7XX devices.

Thank you for your review.

Changes since v4:
- Use clock_ticks_to_ns to compute clock time in nanoseconds. (Didn't apply to PWM patch since it requires a frequency as output.)
- Removed reset_timer and resets immediately in ADC patch.
- Removed "qemu/osdep.h" from headers and include them in .c files.
- Use REG32 for register fields.
- Fix a g_assert that a guest can trigger with incorrect input.

Changes since v3:
- Use type casting instead of accessing parent object in all devices.

Changes since v2:
- Split PWM test into a separate patch in the patch set
- Add trace events for PWM's update_freq/update_duty
- Add trace events for ioread/iowrite in ADC and PWM
- Use timer_get_ns in hw/timer/npcm7xx_timer.c
- Update commit message in ADC/PWM to mention qom-get/set method for usage
- Fix typos

Changes since v1:
- We removed the IPMI and KCS related code from this patch set.

Hao Wu (6):
hw/misc: Add clock converter in NPCM7XX CLK module hw/timer: Refactor NPCM7XX Timer to use CLK clock hw/adc: Add an ADC module for NPCM7XX hw/misc: Add a PWM module for NPCM7XX hw/misc: Add QTest for NPCM7XX PWM Module hw/*: Use type casting for SysBusDevice in NPCM7XX

 docs/system/arm/nuvoton.rst      |   4 +-
 hw/adc/meson.build               |   1 +
 hw/adc/npcm7xx_adc.c             | 301 ++++++++++++
 hw/adc/trace-events              |   5 +
 hw/arm/npcm7xx.c                 |  55 ++-
 hw/arm/npcm7xx_boards.c          |   2 +-
 hw/mem/npcm7xx_mc.c              |   2 +-
 hw/misc/meson.build              |   1 +
 hw/misc/npcm7xx_clk.c            | 797 ++++++++++++++++++++++++++++++-
 hw/misc/npcm7xx_gcr.c            |   2 +-
 hw/misc/npcm7xx_pwm.c            | 550 +++++++++++++++++++++
 hw/misc/npcm7xx_rng.c            |   2 +-
 hw/misc/trace-events             |   6 +
 hw/nvram/npcm7xx_otp.c           |   2 +-
 hw/ssi/npcm7xx_fiu.c             |   2 +-
 hw/timer/npcm7xx_timer.c         |  39 +-
 include/hw/adc/npcm7xx_adc.h     |  69 +++
 include/hw/arm/npcm7xx.h         |   4 +
 include/hw/misc/npcm7xx_clk.h    | 146 +++++-
 include/hw/misc/npcm7xx_pwm.h    | 105 ++++
 include/hw/timer/npcm7xx_timer.h |   1 +
 meson.build                      |   1 +
 tests/qtest/meson.build          |   4 +-
 tests/qtest/npcm7xx_adc-test.c   | 377 +++++++++++++++
 tests/qtest/npcm7xx_pwm-test.c   | 490 +++++++++++++++++++
 25 files changed, 2920 insertions(+), 48 deletions(-)
 create mode 100644 hw/adc/npcm7xx_adc.c
 create mode 100644 hw/adc/trace-events
 create mode 100644 hw/misc/npcm7xx_pwm.c
 create mode 100644 include/hw/adc/npcm7xx_adc.h
 create mode 100644 include/hw/misc/npcm7xx_pwm.h
 create mode 100644 tests/qtest/npcm7xx_adc-test.c
 create mode 100644 tests/qtest/npcm7xx_pwm-test.c
Signature · 1 line
2.29.2.729.g45daf8777d-goog