summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2017-09-09 20:08:49 +0200
committerMartin Roth <martinroth@google.com>2017-09-13 19:08:59 +0000
commit5613b175de4d692321d21637f99578cd3a8ae4a5 (patch)
tree32b28ec801e0a4b2057b35f3e5e928b85dde8b11
parent38bded0eb01a7b2fbcf04f53c1ac12c902d7aed1 (diff)
downloadcoreboot-5613b175de4d692321d21637f99578cd3a8ae4a5.tar.xz
nb/intel/i945/raminit.c: Replace numbers with macros
Use macro instead of numbers Change-Id: Ife1aff0a5cf311881b3a11533b71a74c518a633f Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/21472 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r--src/northbridge/intel/i945/raminit.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c
index 8fe589bc54..f10f1088d6 100644
--- a/src/northbridge/intel/i945/raminit.c
+++ b/src/northbridge/intel/i945/raminit.c
@@ -880,29 +880,29 @@ static void sdram_program_dram_width(struct sys_info *sysinfo)
idx = 1;
switch (sysinfo->dimm[0]) {
- case 0:
- c0dramw = 0x0000; break; /* x16DS */
- case 1:
- c0dramw = 0x0001; break; /* x8DS */
- case 2:
- c0dramw = 0x0000; break; /* x16SS */
- case 3:
- c0dramw = 0x0005; break; /* x8DDS */
- case 4:
- c0dramw = 0x0000; break; /* NC */
+ case SYSINFO_DIMM_X16DS:
+ c0dramw = 0x0000; break;
+ case SYSINFO_DIMM_X8DS:
+ c0dramw = 0x0001; break;
+ case SYSINFO_DIMM_X16SS:
+ c0dramw = 0x0000; break;
+ case SYSINFO_DIMM_X8DDS:
+ c0dramw = 0x0005; break;
+ case SYSINFO_DIMM_NOT_POPULATED:
+ c0dramw = 0x0000; break;
}
switch (sysinfo->dimm[idx]) {
- case 0:
- c1dramw = 0x0000; break; /* x16DS */
- case 1:
- c1dramw = 0x0010; break; /* x8DS */
- case 2:
- c1dramw = 0x0000; break; /* x16SS */
- case 3:
- c1dramw = 0x0050; break; /* x8DDS */
- case 4:
- c1dramw = 0x0000; break; /* NC */
+ case SYSINFO_DIMM_X16DS:
+ c1dramw = 0x0000; break;
+ case SYSINFO_DIMM_X8DS:
+ c1dramw = 0x0010; break;
+ case SYSINFO_DIMM_X16SS:
+ c1dramw = 0x0000; break;
+ case SYSINFO_DIMM_X8DDS:
+ c1dramw = 0x0050; break;
+ case SYSINFO_DIMM_NOT_POPULATED:
+ c1dramw = 0x0000; break;
}
if (!sdram_capabilities_dual_channel()) {