summaryrefslogtreecommitdiffstats
path: root/include/ddr_spd.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-01 16:00:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-04 14:23:32 +0100
commit82f1fc1c923e218d1bc510a427b22c0743f8a057 (patch)
tree2e1fe69c60bd53d40ee227a460bc9f85927d4c5d /include/ddr_spd.h
parent2f054d3d3bb0e3536bd4c635a65677fa0a3a3c6c (diff)
downloadbarebox-82f1fc1c923e218d1bc510a427b22c0743f8a057.tar.gz
barebox-82f1fc1c923e218d1bc510a427b22c0743f8a057.tar.xz
ddr_spd: Add function to read eeprom
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/ddr_spd.h')
-rw-r--r--include/ddr_spd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ddr_spd.h b/include/ddr_spd.h
index 051275141f..95d0eb04b6 100644
--- a/include/ddr_spd.h
+++ b/include/ddr_spd.h
@@ -6,6 +6,8 @@
#ifndef _DDR_SPD_H_
#define _DDR_SPD_H_
+#include <i2c/i2c.h>
+
/*
* Format from "JEDEC Standard No. 21-C,
* Appendix D: Rev 1.0: SPD's for DDR SDRAM
@@ -562,4 +564,8 @@ void ddr2_spd_dump(const struct ddr2_spd_eeprom *spd);
int ddr3_spd_check(const struct ddr3_spd_eeprom *spd);
int ddr4_spd_check(const struct ddr4_spd_eeprom *spd);
+int spd_read_eeprom(void *ctx,
+ int (*xfer)(void *ctx, struct i2c_msg *msgs, int num),
+ uint8_t addr, void *buf);
+
#endif /* _DDR_SPD_H_ */