Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/i2c Pull up the following revisions, requested by...



details:   https://anonhg.NetBSD.org/src/rev/0c7343d03cb8
branches:  netbsd-8
changeset: 1026792:0c7343d03cb8
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 07 11:29:57 2021 +0000

description:
Pull up the following revisions, requested by msaitoh in ticket #1717

        sys/dev/i2c/spdmem_i2c.c                1.23-1.25 via patch

- Carefully access to the I2C bus in the match function.
- Improve bank reset code for DDR4.

diffstat:

 sys/dev/i2c/spdmem_i2c.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r c8b9624d6357 -r 0c7343d03cb8 sys/dev/i2c/spdmem_i2c.c
--- a/sys/dev/i2c/spdmem_i2c.c  Mon Dec 06 19:34:29 2021 +0000
+++ b/sys/dev/i2c/spdmem_i2c.c  Tue Dec 07 11:29:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.13.8.1 2019/11/16 16:26:17 martin Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.13.8.2 2021/12/07 11:29:57 martin Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.13.8.1 2019/11/16 16:26:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.13.8.2 2021/12/07 11:29:57 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -115,7 +115,11 @@
         */
        rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, &reg, 1,
            &byte0, 1, I2C_F_POLL);
-       rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, &reg, 1,
+       if (rv != 0)
+               goto error;
+
+       reg = 2;
+       rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, &reg, 1,
            &byte2, 1, I2C_F_POLL);
        if (rv != 0)
                goto error;



Home | Main Index | Thread Index | Old Index