]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i2c/imx: Always set interrupt status bit if interrupt condition occurs
authorBernhard Beschow <shentey@gmail.com>
Wed, 7 May 2025 12:40:40 +0000 (14:40 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 11 May 2025 06:16:33 +0000 (09:16 +0300)
commit9340920c3f5d62d72c62f6e18094815ebc9f8144
treea93bc4a8ee6249bd1473acaa60ed1b37f311d8f9
parentbfa3f55f0fe9a4185577447faedcb5b4b302f947
hw/i2c/imx: Always set interrupt status bit if interrupt condition occurs

According to the i.MX 8M Plus reference manual, the status flag
I2C_I2SR[IIF] continues to be set when an interrupt condition
occurs even when I2C interrupts are disabled (I2C_I2CR[IIEN] is
clear). However, the device model only sets the flag when I2C
interrupts are enabled which causes U-Boot to loop forever. Fix
the device model by always setting the flag and let I2C_I2CR[IIEN]
guard I2C interrupts only.

Also remove the comment in the code since it merely stated the
obvious and would be outdated now.

Cc: qemu-stable@nongnu.org
Fixes: 20d0f9cf6a41 ("i.MX: Add I2C controller emulator")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-ID: <20250507124040.425773-1-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 54e54e594bc8273d210f7ff4448c165a989cbbe8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/i2c/imx_i2c.c