On 6/2/24 14:29, Peter Maydell wrote:
Add the GPIO, watchdog, dual-timer and I2C devices to the mps3-an536
board.  These are all simple devices that just need to be created and
wired up.

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
  hw/arm/mps3r.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 59 insertions(+)


+    for (int i = 0; i < ARRAY_SIZE(mms->i2c); i++) {

+        if (i != 2 && i != 3) {

Maybe easier to read as:

          if (i < 2 || i > 3) {

+            /*
+             * internal-only bus: mark it full to avoid user-created
+             * i2c devices being plugged into it.
+             */
+            qbus_mark_full(qdev_get_child_bus(DEVICE(&mms->i2c[i]), "i2c"));

TIL qbus_mark_full! Nice.

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>

+        }
+    }

Reply via email to