[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for 2.10 v2 20/20] i2c/exynos4210: fix write to I2CA
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH for 2.10 v2 20/20] i2c/exynos4210: fix write to I2CADD register, bit 0 is not mapped |
Date: |
Wed, 26 Jul 2017 23:42:24 -0300 |
>From the Exynos4210 User Manual [1]:
14.4.1.3 I2CADDn (MULTI-MASTER I2C-Bus Address Register)
[7-1] slave address, latched from the I2C-bus.
bit [0] is not mapped.
[1]: Exynos_4_Dual_45nm_User_Manaul_Public_REV1.00-0.pdf
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/i2c/exynos4210_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i2c/exynos4210_i2c.c b/hw/i2c/exynos4210_i2c.c
index c96fa7d7be..e6a9ca8f03 100644
--- a/hw/i2c/exynos4210_i2c.c
+++ b/hw/i2c/exynos4210_i2c.c
@@ -243,7 +243,7 @@ static void exynos4210_i2c_write(void *opaque, hwaddr
offset,
break;
case I2CADD_ADDR:
if ((s->i2cstat & I2CSTAT_OUTPUT_EN) == 0) {
- s->i2cadd = v;
+ s->i2cadd = v & ~1;
}
break;
case I2CDS_ADDR:
--
2.13.3