summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2008-11-10 07:22:48 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2008-11-10 07:22:48 +0000
commitc6be0ce4f21a39f5570c453158e727f482842f0c (patch)
treed4d2186d441222e1ce721e69842d2cf0fde29a8d /sys
parentc3ba3be26b1b11c01d238adf90a11c69a17e68e8 (diff)
remove some dead code and fix a comment; llvm/clang; ok jsg
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/spdmem.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/dev/i2c/spdmem.c b/sys/dev/i2c/spdmem.c
index f4b8c5865be..2c77dcb9ff8 100644
--- a/sys/dev/i2c/spdmem.c
+++ b/sys/dev/i2c/spdmem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spdmem.c,v 1.26 2008/05/21 12:51:45 jsg Exp $ */
+/* $OpenBSD: spdmem.c,v 1.27 2008/11/10 07:22:47 cnst Exp $ */
/* $NetBSD: spdmem.c,v 1.3 2007/09/20 23:09:59 xtraeme Exp $ */
/*
@@ -255,9 +255,9 @@ void
spdmem_sdram_decode(struct spdmem_softc *sc, struct spdmem *s)
{
const char *type;
- int dimm_size, cycle_time, d_clk, p_clk, bits;
+ int dimm_size, cycle_time, p_clk;
int num_banks, per_chip;
- uint8_t config, rows, cols;
+ uint8_t rows, cols;
type = spdmem_basic_types[s->sm_type];
@@ -266,8 +266,6 @@ spdmem_sdram_decode(struct spdmem_softc *sc, struct spdmem *s)
if (s->sm_data[SPDMEM_SDR_SUPERSET] == SPDMEM_SUPERSET_ESDRAM)
type = spdmem_superset_types[SPDMEM_SUPERSET_ESDRAM];
- dimm_size = 0;
-
num_banks = s->sm_data[SPDMEM_SDR_BANKS];
per_chip = s->sm_data[SPDMEM_SDR_BANKS_PER_CHIP];
rows = s->sm_data[SPDMEM_SDR_ROWS] & 0x0f;
@@ -301,12 +299,6 @@ spdmem_sdram_decode(struct spdmem_softc *sc, struct spdmem *s)
* floating point. Calculate memory speed as the number
* of cycles per microsecond.
*/
- d_clk = 100 * 1000;
- config = s->sm_data[SPDMEM_FPM_CONFIG];
- bits = s->sm_data[SPDMEM_DDR_DATAWIDTH] |
- (s->sm_data[SPDMEM_DDR_DATAWIDTH + 1] << 8);
- if (config == 1 || config == 2)
- bits -= 8;
p_clk = 66;
if (s->sm_len >= 128) {
@@ -384,8 +376,6 @@ spdmem_ddr_decode(struct spdmem_softc *sc, struct spdmem *s)
if (s->sm_data[SPDMEM_DDR_SUPERSET] == SPDMEM_SUPERSET_DDR_ESDRAM)
type = spdmem_superset_types[SPDMEM_SUPERSET_DDR_ESDRAM];
- dimm_size = 0;
-
num_banks = s->sm_data[SPDMEM_SDR_BANKS];
per_chip = s->sm_data[SPDMEM_SDR_BANKS_PER_CHIP];
rows = s->sm_data[SPDMEM_SDR_ROWS] & 0x0f;
@@ -418,7 +408,7 @@ spdmem_ddr_decode(struct spdmem_softc *sc, struct spdmem *s)
* cycle time is scaled by a factor of 100 to avoid using
* floating point. Calculate memory speed as the number
* of cycles per microsecond.
- * DDR2 uses dual-pumped clock
+ * DDR uses dual-pumped clock
*/
d_clk = 100 * 1000 * 2;
config = s->sm_data[SPDMEM_FPM_CONFIG];
@@ -455,8 +445,6 @@ spdmem_ddr2_decode(struct spdmem_softc *sc, struct spdmem *s)
type = spdmem_basic_types[s->sm_type];
- dimm_size = 0;
-
num_ranks = (s->sm_data[SPDMEM_DDR2_RANKS] & 0x7) + 1;
density = (s->sm_data[SPDMEM_DDR2_RANK_DENSITY] & 0xf0) |
((s->sm_data[SPDMEM_DDR2_RANK_DENSITY] & 0x0f) << 8);