summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-03-28 13:43:13 +0200
committerAngel Pons <th3fanbus@gmail.com>2021-04-05 13:01:29 +0000
commitafb3d7e7ecccdc1fbde66fe08252bd97de4df35d (patch)
treeda6ba2eaf03d9afd52e1fc95d2b540ec230246be /src/include/device
parent4774012515db737c3aada7ced093851346aece4d (diff)
device/dram/ddr3: Get rid of useless typedefs
These typedefs are not necessary. Remove them, and rename some elements to avoid any confusion with other DRAM generations, such as DDR4. Change-Id: Ibe40f33372358262c540e371f7866b06a4ac842a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51895 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/dram/ddr3.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/include/device/dram/ddr3.h b/src/include/device/dram/ddr3.h
index 0814990eb9..6afccebdff 100644
--- a/src/include/device/dram/ddr3.h
+++ b/src/include/device/dram/ddr3.h
@@ -75,7 +75,7 @@ enum spd_dimm_type {
*
* Characteristic flags for the DIMM, as presented by the SPD
*/
-typedef union dimm_flags_st {
+union dimm_flags_ddr3_st {
/* The whole point of the union/struct construct is to allow us to clear
* all the bits with one line: flags.raw = 0.
* We do not care how these bits are ordered */
@@ -111,19 +111,19 @@ typedef union dimm_flags_st {
unsigned int therm_sensor:1;
};
unsigned int raw;
-} dimm_flags_t;
+};
/**
* \brief DIMM characteristics
*
* The characteristics of each DIMM, as presented by the SPD
*/
-typedef struct dimm_attr_st {
+struct dimm_attr_ddr3_st {
enum spd_memory_type dram_type;
enum spd_dimm_type dimm_type;
u16 cas_supported;
/* Flags extracted from SPD */
- dimm_flags_t flags;
+ union dimm_flags_ddr3_st flags;
/* SDRAM width */
u8 width;
/* Number of ranks */
@@ -161,7 +161,7 @@ typedef struct dimm_attr_st {
u8 part_number[17];
/* Serial number */
u8 serial[SPD_DIMM_SERIAL_LEN];
-} dimm_attr;
+};
enum ddr3_xmp_profile {
DDR3_XMP_PROFILE_1 = 0,
@@ -172,15 +172,15 @@ typedef u8 spd_raw_data[256];
u16 spd_ddr3_calc_crc(u8 *spd, int len);
u16 spd_ddr3_calc_unique_crc(u8 *spd, int len);
-int spd_decode_ddr3(dimm_attr *dimm, spd_raw_data spd_data);
+int spd_decode_ddr3(struct dimm_attr_ddr3_st *dimm, spd_raw_data spd_data);
int spd_dimm_is_registered_ddr3(enum spd_dimm_type type);
-void dram_print_spd_ddr3(const dimm_attr *dimm);
-int spd_xmp_decode_ddr3(dimm_attr *dimm,
+void dram_print_spd_ddr3(const struct dimm_attr_ddr3_st *dimm);
+int spd_xmp_decode_ddr3(struct dimm_attr_ddr3_st *dimm,
spd_raw_data spd,
enum ddr3_xmp_profile profile);
enum cb_err spd_add_smbios17(const u8 channel, const u8 slot,
const u16 selected_freq,
- const dimm_attr *info);
+ const struct dimm_attr_ddr3_st *info);
/**
* \brief Read double word from specified address
*