Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic - Move __DDR4_VALUE()'s comment to the correct po...
details: https://anonhg.NetBSD.org/src/rev/b32c5a24042d
branches: trunk
changeset: 350733:b32c5a24042d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Jan 18 06:02:50 2017 +0000
description:
- Move __DDR4_VALUE()'s comment to the correct position.
- s/ftp/ftb/. No functional change.
diffstat:
sys/dev/ic/spdmem.c | 14 +++++++-------
sys/dev/ic/spdmemvar.h | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (64 lines):
diff -r 9526cd8d4a9f -r b32c5a24042d sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c Wed Jan 18 05:48:16 2017 +0000
+++ b/sys/dev/ic/spdmem.c Wed Jan 18 06:02:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.23 2017/01/11 21:44:50 maya Exp $ */
+/* $NetBSD: spdmem.c,v 1.24 2017/01/18 06:02:50 msaitoh Exp $ */
/*
* Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.23 2017/01/11 21:44:50 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.24 2017/01/18 06:02:50 msaitoh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -909,11 +909,15 @@
}
}
+/*
+ * Note that the ddr4_xxx_ftb fields are actually signed offsets from
+ * the corresponding mtb value, so we might have to subtract 256!
+ */
#define __DDR4_VALUE(field) ((s->sm_ddr4.ddr4_##field##_mtb * 125 + \
s->sm_ddr4.ddr4_##field##_ftb) - \
((s->sm_ddr4.ddr4_##field##_ftb > 127)?256:0))
/*
- * For now, the only value for mtb is 1 = 125ps, and ftp = 1ps
+ * For now, the only value for mtb is 0 = 125ps, and ftb = 1ps
* so we don't need to figure out the time-base units - just
* hard-code them for now.
*/
@@ -930,10 +934,6 @@
1 << s->sm_ddr4.ddr4_bankgroups,
cycle_time / 1000, cycle_time % 1000);
-/*
- * Note that the ddr4_xxx_ftb fields are actually signed offsets from
- * the corresponding mtb value, so we might have to subtract 256!
- */
tAA_clocks = __DDR4_VALUE(tAAmin) * 1000 / cycle_time;
tRCD_clocks = __DDR4_VALUE(tRCDmin) * 1000 / cycle_time;
diff -r 9526cd8d4a9f -r b32c5a24042d sys/dev/ic/spdmemvar.h
--- a/sys/dev/ic/spdmemvar.h Wed Jan 18 05:48:16 2017 +0000
+++ b/sys/dev/ic/spdmemvar.h Wed Jan 18 06:02:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmemvar.h,v 1.12 2016/09/05 04:06:55 msaitoh Exp $ */
+/* $NetBSD: spdmemvar.h,v 1.13 2017/01/18 06:02:50 msaitoh Exp $ */
/*
* Copyright (c) 2007 Paul Goyette
@@ -353,7 +353,7 @@
);
SPD_BITFIELD( \
uint8_t fbdimm_ftb_divisor:4, \
- uint8_t fbdimm_ftp_dividend:4, ,\
+ uint8_t fbdimm_ftb_dividend:4, ,\
);
uint8_t fbdimm_mtb_dividend;
uint8_t fbdimm_mtb_divisor;
Home |
Main Index |
Thread Index |
Old Index