Commit 9ebe16b2 authored by Luc Verhaegen's avatar Luc Verhaegen
Browse files

meminfo: fix up density calculation


Signed-off-by: default avatarLuc Verhaegen <libv@skynet.be>
parent d4e34bcb
...@@ -243,7 +243,7 @@ int main(int argc, char **argv) ...@@ -243,7 +243,7 @@ int main(int argc, char **argv)
p.cas = (r->mr >> 4 & 15); p.cas = (r->mr >> 4 & 15);
if (p.type == 3) if (p.type == 3)
p.cas += 4; p.cas += 4;
p.density = (1 << 8) + (r->dcr >> 3 & 7); p.density = 1 << (8 + ((r->dcr >> 3) & 7));
p.rank_num = (r->dcr >> 10 & 3)+1; p.rank_num = (r->dcr >> 10 & 3)+1;
p.io_width = (r->dcr >> 1 & 3) << 3; p.io_width = (r->dcr >> 1 & 3) << 3;
p.bus_width = ((r->dcr >> 6 & 3)+1) << 3; p.bus_width = ((r->dcr >> 6 & 3)+1) << 3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment