diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2018-02-12 15:12:34 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-02-22 10:07:53 +0000 |
commit | fc31e44e47751a7cbffea19920f1f5ef34c6bc13 (patch) | |
tree | 45acf31505bf59ae0c055818640775886114e970 /src/device/dram/ddr2.c | |
parent | 13089b008ff6a3700b9343902fa7b17890a63d92 (diff) |
device/ddr2,ddr3: Rename and move a few things
In order for ddr2.h and ddr3.h to be included in the same file it
cannot have conflicting definitions, therefore rename a few things and
move some things to a common header.
Change-Id: I6056148872076048e055f1d20a60ac31afd7cde6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Diffstat (limited to 'src/device/dram/ddr2.c')
-rw-r--r-- | src/device/dram/ddr2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/device/dram/ddr2.c b/src/device/dram/ddr2.c index 0117b93d06..eefb569b25 100644 --- a/src/device/dram/ddr2.c +++ b/src/device/dram/ddr2.c @@ -38,11 +38,11 @@ * * @param type DIMM type. This is byte[20] of the SPD. */ -int spd_dimm_is_registered_ddr2(enum spd_dimm_type type) +int spd_dimm_is_registered_ddr2(enum spd_dimm_type_ddr2 type) { - if ((type == SPD_DIMM_TYPE_RDIMM) - || (type == SPD_DIMM_TYPE_72B_SO_RDIMM) - || (type == SPD_DIMM_TYPE_MINI_RDIMM)) + if ((type == SPD_DDR2_DIMM_TYPE_RDIMM) + || (type == SPD_DDR2_DIMM_TYPE_72B_SO_RDIMM) + || (type == SPD_DDR2_DIMM_TYPE_MINI_RDIMM)) return 1; return 0; @@ -297,7 +297,7 @@ static void spd_decode_tRCtRFC_time(u8 *spd_40_41_42, u32 *tRC, u32 *tRFC) * SPD_STATUS_INVALID_FIELD -- A field with an invalid value was * detected. */ -int spd_decode_ddr2(struct dimm_attr_st *dimm, u8 spd[SPD_SIZE_MAX_DDR2]) +int spd_decode_ddr2(struct dimm_attr_ddr2_st *dimm, u8 spd[SPD_SIZE_MAX_DDR2]) { u8 spd_size, cl, reg8; u16 eeprom_size; @@ -582,7 +582,7 @@ int spd_decode_ddr2(struct dimm_attr_st *dimm, u8 spd[SPD_SIZE_MAX_DDR2]) } printram("\n"); - dimm->dimm_type = spd[20] & SPD_DIMM_TYPE_MASK; + dimm->dimm_type = spd[20] & SPD_DDR2_DIMM_TYPE_MASK; printram(" Dimm type : %x\n", dimm->dimm_type); dimm->flags.is_ecc = !!(spd[11] & 0x3); @@ -648,7 +648,7 @@ static void print_us(const char *msg, u32 val) * * @param dimm pointer to already decoded @ref dimm_attr structure */ -void dram_print_spd_ddr2(const struct dimm_attr_st *dimm) +void dram_print_spd_ddr2(const struct dimm_attr_ddr2_st *dimm) { char buf[32]; int i; |