diff options
author | Robert Beckett <bob.beckett@collabora.com> | 2019-10-28 20:44:58 +0300 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2019-12-17 08:57:22 +0300 |
commit | 22e93511be2e012d3f807641b07e09b649a71ef6 (patch) | |
tree | df80b24f773abc32a670dc241c4d044d5c83ed6f /arch/sandbox/include | |
parent | 85968522b928e19a27aa79f0cb186c80b8b82e47 (diff) | |
download | u-boot-22e93511be2e012d3f807641b07e09b649a71ef6.tar.xz |
dm: i2c: EEPROM simulator allow tests visibility of addr and offset
Improve i2c EEPROM simulator testing by providing access functions to
check the previous chip addr and offset.
Given that we can now directly test the offsets, also simplified the
offset mapping and allow for wrapping acceses.
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/test.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index b885e1a14f..f3a8b455d5 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -72,6 +72,10 @@ void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev, void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len); +uint sanbox_i2c_eeprom_get_prev_addr(struct udevice *dev); + +uint sanbox_i2c_eeprom_get_prev_offset(struct udevice *dev); + /** * sandbox_i2c_rtc_set_offset() - set the time offset from system/base time * |