summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-04 10:10:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-04 14:23:32 +0100
commitd5ddccb187ac55e0a41fad62839050e2b822ef46 (patch)
treee2bb8cc41a2aa2a1193e2730c07a1b7c78645b19
parent82f1fc1c923e218d1bc510a427b22c0743f8a057 (diff)
downloadbarebox-d5ddccb187ac55e0a41fad62839050e2b822ef46.tar.gz
barebox-d5ddccb187ac55e0a41fad62839050e2b822ef46.tar.xz
ddr_spd: provide common SPD type
Provide a common struct type for the different SPD EEPROM types. Can be used to pass around SPD data without specifying the DDR type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--include/ddr_spd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ddr_spd.h b/include/ddr_spd.h
index 95d0eb04b6..6e63d90e5e 100644
--- a/include/ddr_spd.h
+++ b/include/ddr_spd.h
@@ -499,6 +499,16 @@ struct ddr4_spd_eeprom {
uint8_t user[512-384]; /* 384~511 End User Programmable */
};
+struct spd_eeprom {
+ union {
+ struct ddr1_spd_eeprom ddr1;
+ struct ddr2_spd_eeprom ddr2;
+ struct ddr3_spd_eeprom ddr3;
+ struct ddr4_spd_eeprom ddr4;
+ uint8_t data[512];
+ };
+};
+
/*
* Byte 2 Fundamental Memory Types.
*/