From fc31e44e47751a7cbffea19920f1f5ef34c6bc13 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 12 Feb 2018 15:12:34 +0100 Subject: device/ddr2,ddr3: Rename and move a few things MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/23717 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer --- src/device/dram/ddr2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/device/dram') 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; -- cgit v1.2.3