coreboot/src
Nico Huber 3ded3588a1 UPSTREAM: nb/intel/x4x/raminit: Fix DIMM_IN_CHANNEL calculation
Fix-up for 696abfc
  nb/intel/x4x: Fix and deflate `dimm_config` in raminit

It didn't fix the channel-number shifting issue as intended.

The channel index is either 0 or 1. DIMMs are counted from 0
to 3 where 0..1 covers channel 0, and 2..3 covers channel 1.
Since we have two DIMMs per channel, we have to multiply the
channel index by 2 (or shift it left by 1) to get the index
of the first DIMM in the channel. Finally, to get the offset
of a DIMM in the channel we take its index modulo 2 (again,
the number of DIMMs per channel).

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17612
Tested-by: build bot (Jenkins)
Reviewed-by: Damien Zammit <damien@zamaudio.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>

Change-Id: I2784b0cb655bfe823bf5fa48b722623dfca1ddc3
Reviewed-on: https://chromium-review.googlesource.com/415096
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-30 02:53:54 -08:00
..
acpi UPSTREAM: src/acpi: Capitalize ACPI and SATA 2016-08-04 23:37:57 -07:00
arch UPSTREAM: arch/x86/acpigen: Write DSM method with multiple UUID's 2016-11-29 17:39:23 -08:00
commonlib UPSTREAM: commonlib/include: remove NEED_VB20_INTERNALS 2016-11-21 11:53:31 -08:00
console UPSTREAM: console/vtxprintf.c: cast precision to size_t for string length 2016-11-29 17:38:21 -08:00
cpu UPSTREAM: AGESA binaryPI: Fix cache-as-ram for x86_64 2016-11-30 02:53:14 -08:00
device UPSTREAM: device/dram/ddr3: Fix calculation CRC16 of SPD 2016-11-21 11:54:09 -08:00
drivers UPSTREAM: drivers/net/Kconfig: Hide REALTEK_8168_RESET in menuconfig 2016-11-30 02:53:05 -08:00
ec UPSTREAM: google/parrot: Fix keyboard interrupts, DSDT 2016-11-30 02:53:19 -08:00
include UPSTREAM: x86 BIST: Fix missing include 2016-11-30 02:53:12 -08:00
lib UPSTREAM: intel post-car: Increase stacktop alignment 2016-11-21 11:53:20 -08:00
mainboard UPSTREAM: mb/intel/d945gclf: Add cmos.default 2016-11-30 02:53:47 -08:00
northbridge UPSTREAM: nb/intel/x4x/raminit: Fix DIMM_IN_CHANNEL calculation 2016-11-30 02:53:54 -08:00
soc UPSTREAM: soc/intel/skylake: Initialize UART based on CONFIG_UART_DEBUG 2016-11-30 02:53:49 -08:00
southbridge UPSTREAM: sb/intel/i3100/lpc.c: Use tab for indents 2016-11-30 02:53:37 -08:00
superio UPSTREAM: sio/it8718f: Hook up common environment-controller driver 2016-11-30 02:53:40 -08:00
vboot UPSTREAM: commonlib/include: remove NEED_VB20_INTERNALS 2016-11-21 11:53:31 -08:00
vendorcode UPSTREAM: vendorcode/siemens: Add HWID to hwilib 2016-11-30 02:53:07 -08:00
Kconfig UPSTREAM: Remove explicit select MMCONF_SUPPORT 2016-11-29 17:38:33 -08:00