Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Calculate DDR3's tRAS correctly.
details: https://anonhg.NetBSD.org/src/rev/3c6e4e22f400
branches: trunk
changeset: 746199:3c6e4e22f400
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Mar 24 03:47:39 2020 +0000
description:
Calculate DDR3's tRAS correctly.
diffstat:
sys/dev/ic/spdmem.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r dbb4bf05381d -r 3c6e4e22f400 sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c Tue Mar 24 03:45:25 2020 +0000
+++ b/sys/dev/ic/spdmem.c Tue Mar 24 03:47:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.34 2020/03/24 03:45:25 msaitoh Exp $ */
+/* $NetBSD: spdmem.c,v 1.35 2020/03/24 03:47:39 msaitoh Exp $ */
/*
* Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.34 2020/03/24 03:45:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.35 2020/03/24 03:47:39 msaitoh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -830,8 +830,9 @@
__DDR3_CYCLES(__DDR3_VALUE_PICO(s, tAAmin)),
__DDR3_CYCLES(__DDR3_VALUE_PICO(s, tRCDmin)),
__DDR3_CYCLES(__DDR3_VALUE_PICO(s, tRPmin)),
- (s->sm_ddr3.ddr3_tRAS_msb * 256 + s->sm_ddr3.ddr3_tRAS_lsb) /
- s->sm_ddr3.ddr3_tCKmin_mtb);
+ __DDR3_CYCLES((s->sm_ddr3.ddr3_tRAS_msb * 256
+ + s->sm_ddr3.ddr3_tRAS_lsb) * s->sm_ddr3.ddr3_mtb_dividend
+ / s->sm_ddr3.ddr3_mtb_divisor * 1000));
#undef __DDR3_CYCLES
Home |
Main Index |
Thread Index |
Old Index