summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
author张忠山 <zzs213@126.com>2019-04-09 17:56:53 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-04-10 08:25:04 +0200
commitfd074a7a7961af9db076f2b82ccb9d9ba2a63f43 (patch)
treeb709492df9076ec077ad97c2c47d09f469acad16 /common
parent05e69a1b693c1a661a04c4d7bf4ac929c3c8fa22 (diff)
downloadbarebox-fd074a7a7961af9db076f2b82ccb9d9ba2a63f43.tar.gz
ddr_spd: Fix mod_ranks test
((x & 0x10) == 1) can never be true. Test for the bit at 0x10 instead. Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/ddr_spd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ddr_spd.c b/common/ddr_spd.c
index 0ba5eac..23df3e7 100644
--- a/common/ddr_spd.c
+++ b/common/ddr_spd.c
@@ -325,7 +325,7 @@ void ddr_spd_print(uint8_t *record)
printf("Error module type\n");
printf("%-48s ", "DRAM Package ");
- if ((s->mod_ranks & 0x10) == 1)
+ if ((s->mod_ranks & 0x10) != 0)
printf("Stack\n");
else
printf("Planar\n");