On Tue, 9 Jun 2026 at 03:40, Nicholas Righi <[email protected]> wrote:
>
> The I2C interrupts are only routed to the legacy interrupt controller. This 
> means
> that for modern device trees that use the GIC, the interrupts don't work. 
> This patch
> adds a splitter to route the I2C interrupt to both the legacy interrupt 
> controller and the GIC.
>
> Testing
>
> Add these lines to QEMU invocation
>
> -drive if=none,id=i2c_storage,format=raw,file=eeprom.bin \
> -device 
> at24c-eeprom,bus=i2c-bus.1,address=0x50,drive=i2c_storage,rom-size=4096 \
>
> note: eeprom.bin is all zeros
>
> Before this change, running i2c get to read from EEPROM would result in this
>
> i2cget -y 1 0x50
> Error: Read failed
>
> After this change, running i2c to read from EEPROM results in this
>
> i2cget -y 1 0x50
> 0x00
>
> The eeprom can now also be enabled in the device tree. Before the
> eeprom driver load would fail due to the read failing
>
> ls -l /sys/bus/i2c/devices/i2c-1/1-0050/ | grep -i eeprom
> -rw------- 1 root root 4096 May 17 16:57 eeprom
>
> Signed-off-by: Nicholas Righi <[email protected]>
> ---
> Changes v1 -> v2:
>     - Use a splitter to route the OR gated i2c interrupt to both the
>       legacy interrupt controller and the GIC, instead of just replacing
>       the legacy routing with the GIC routing
> ---
>  hw/arm/bcm2835_peripherals.c         | 9 +++++++++
>  hw/arm/bcm2838.c                     | 4 ++++
>  include/hw/arm/bcm2835_peripherals.h | 2 ++
>  include/hw/arm/bcm2838_peripherals.h | 1 +
>  4 files changed, 16 insertions(+)



Applied to target-arm.next, thanks.

-- PMM

Reply via email to