Skip to content

hw: interrupt, reset and divider fixes for BCM2835 peripherals

Lorand Marton qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5MAINTAINERS: list the BCM283x qtests under Raspberry PiMAINTAINERS+1 -01 reply
2/5hw/i2c/bcm2835_i2c: update the interrupt when the status is clearedhw/i2c/bcm2835_i2c.c tests/qtest/bcm2835-i2c-test.c+25 -01 reply
3/5hw/ssi/bcm2835_spi: lower the interrupt on resethw/ssi/bcm2835_spi.c tests/qtest/bcm2835-spi-test.c tests/qtest/meson.build+46 -11 reply
4/5hw/timer/bcm2835_systmr: cancel the compares and lower the IRQs on resethw/timer/bcm2835_systmr.c tests/qtest/bcm2835-systmr-test.c tests/qtest/meson.build+59 -11 reply
5/5hw/misc/bcm2835_cprman: a PLL channel divider of 0 divides by 256hw/misc/bcm2835_cprman.c tests/qtest/bcm2835-cprman-test.c tests/qtest/meson.build+54 -41 reply

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchPeter Maydell
1/5R-b
2/5R-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] hw: interrupt, reset and divider fixes for BCM2835 peripherals

Four fixes for BCM2835 peripheral models that the raspi3b and raspi4b machines use, each with a qtest that fails without the fix:

- bcm2835_i2c: writing 1 to DONE in S did not lower the interrupt.
- bcm2835_spi: a reset left the interrupt line raised.
- bcm2835_systmr: a reset left raised interrupts raised, and a compare set before the reset still fired after it.
- bcm2835_cprman: a PLL channel divider of 0 divided by 255, not 256.

Patch 1 adds the BCM283x qtests to the Raspberry Pi section of
MAINTAINERS: the three that exist have no entry, and patches 3 to 5 add three more.

The fixes are independent bug fixes and apply to master.

I found these bugs while running Raspberry Pi OS images on a model of the Compute Module 4: https://github.com/LorandMarton/boardtwin. Its QEMU changes are on the boardtwin-develop branch of
https://github.com/LorandMarton/qemu. I intend to send the board model (raspicm4) after the 11.2 release.

Checked: each patch builds and passes its qtests; each new test fails with only its fix reverted; the aarch64 qtests pass (35, 3 skipped:
the slow cdrom test and the two swtpm tests).

Lorand Marton (5):
MAINTAINERS: list the BCM283x qtests under Raspberry Pi hw/i2c/bcm2835_i2c: update the interrupt when the status is cleared hw/ssi/bcm2835_spi: lower the interrupt on reset hw/timer/bcm2835_systmr: cancel the compares and lower the IRQs on
reset
hw/misc/bcm2835_cprman: a PLL channel divider of 0 divides by 256

 MAINTAINERS                       |  1 +
 hw/i2c/bcm2835_i2c.c              |  1 +
 hw/misc/bcm2835_cprman.c          |  6 ++--
 hw/ssi/bcm2835_spi.c              |  2 ++
 hw/timer/bcm2835_systmr.c         |  4 +++
 tests/qtest/bcm2835-cprman-test.c | 49 ++++++++++++++++++++++++++++
 tests/qtest/bcm2835-i2c-test.c    | 24 ++++++++++++++
 tests/qtest/bcm2835-spi-test.c    | 42 ++++++++++++++++++++++++
 tests/qtest/bcm2835-systmr-test.c | 54 +++++++++++++++++++++++++++++++
 tests/qtest/meson.build           |  4 ++-
 10 files changed, 183 insertions(+), 4 deletions(-)
 create mode 100644 tests/qtest/bcm2835-cprman-test.c
 create mode 100644 tests/qtest/bcm2835-spi-test.c
 create mode 100644 tests/qtest/bcm2835-systmr-test.c

base-commit: 56afd82bd4db9688f1c1c9d0e2ea163b8cde3283

Signature · 1 line
2.56.0