aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorRobert Beckett <bob.beckett@collabora.com>2019-10-28 17:44:58 +0000
committerHeiko Schocher <hs@denx.de>2019-12-17 06:57:22 +0100
commit22e93511be2e012d3f807641b07e09b649a71ef6 (patch)
treedf80b24f773abc32a670dc241c4d044d5c83ed6f /arch/sandbox
parent85968522b928e19a27aa79f0cb186c80b8b82e47 (diff)
downloadu-boot-22e93511be2e012d3f807641b07e09b649a71ef6.zip
u-boot-22e93511be2e012d3f807641b07e09b649a71ef6.tar.gz
u-boot-22e93511be2e012d3f807641b07e09b649a71ef6.tar.bz2
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')
-rw-r--r--arch/sandbox/include/asm/test.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index b885e1a..f3a8b45 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
*