|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 11/13] hw/arm/mps3r: Add GPIO, watchdog, dual-timer, I2C devices |
Date: | Tue, 6 Feb 2024 17:47:21 +0100 |
User-agent: | Mozilla Thunderbird |
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.maydell@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é <philmd@linaro.org>
+ } + }
[Prev in Thread] | Current Thread | [Next in Thread] |