Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Add code for DDR5 a little. I have no datasheet.



details:   https://anonhg.NetBSD.org/src/rev/56969178eda1
branches:  trunk
changeset: 359873:56969178eda1
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sat Jan 29 08:17:03 2022 +0000

description:
Add code for DDR5 a little. I have no datasheet.

diffstat:

 sys/dev/ic/spdmem.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 1ca7baeaafd0 -r 56969178eda1 sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c       Sat Jan 29 08:14:24 2022 +0000
+++ b/sys/dev/ic/spdmem.c       Sat Jan 29 08:17:03 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.36 2022/01/29 08:14:24 msaitoh Exp $ */
+/* $NetBSD: spdmem.c,v 1.37 2022/01/29 08:17:03 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.36 2022/01/29 08:14:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.37 2022/01/29 08:17:03 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -269,6 +269,14 @@
                 * it some other time.
                 */
                return 1;
+       } else if (spd_type == SPDMEM_MEMTYPE_DDR5SDRAM) {
+               /* XXX Need Datasheet. */
+               (sc->sc_read)(sc, 0, &val);
+               spd_len = val & 0x0f;
+               if ((unsigned int)spd_len >= __arraycount(spd_rom_sizes))
+                       return 0;
+               aprint_verbose("DDR5 SPD ROM?\n");
+               return 0;
        }
 
        /* For unrecognized memory types, don't match at all */



Home | Main Index | Thread Index | Old Index