Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/01fd99606694
branches:  netbsd-9
changeset: 1026791:01fd99606694
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 07 11:25:12 2021 +0000

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

        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 19eee5551698 -r 01fd99606694 sys/dev/i2c/spdmem_i2c.c
--- a/sys/dev/i2c/spdmem_i2c.c  Mon Dec 06 19:33:07 2021 +0000
+++ b/sys/dev/i2c/spdmem_i2c.c  Tue Dec 07 11:25:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.17 2018/10/20 03:23:05 macallan Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.17.4.1 2021/12/07 11:25:12 martin Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.17 2018/10/20 03:23:05 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.17.4.1 2021/12/07 11:25:12 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