aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-12-14 19:06:49 +0200
committerSimon Glass <sjg@chromium.org>2020-12-22 20:39:26 -0700
commitadd685fb6d8de91723d006a0382f76041320b529 (patch)
tree1d2cbedf8cc08a601cc899e3e54b3aaf1870f1ac /arch
parent2da1800456909944b393ad8539edb0bf3e997e2d (diff)
downloadu-boot-add685fb6d8de91723d006a0382f76041320b529.zip
u-boot-add685fb6d8de91723d006a0382f76041320b529.tar.gz
u-boot-add685fb6d8de91723d006a0382f76041320b529.tar.bz2
test: spi: Add sandbox_spi_get_{speed, mode} interface
Introduce sandbox_spi_get_{speed, mode} public interface to retrieve the sandbox spi bus internal state. They are meant to be used in sandbox spi testcases. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/include/asm/test.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index 7f99d07..05f66f7 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -203,6 +203,22 @@ void sandbox_set_allow_beep(struct udevice *dev, bool allow);
int sandbox_get_beep_frequency(struct udevice *dev);
/**
+ * sandbox_spi_get_speed() - Get current speed setting of a sandbox spi bus
+ *
+ * @dev: Device to check
+ * @return current bus speed
+ */
+uint sandbox_spi_get_speed(struct udevice *dev);
+
+/**
+ * sandbox_spi_get_mode() - Get current mode setting of a sandbox spi bus
+ *
+ * @dev: Device to check
+ * @return current mode
+ */
+uint sandbox_spi_get_mode(struct udevice *dev);
+
+/**
* sandbox_get_pch_spi_protect() - Get the PCI SPI protection status
*
* @dev: Device to check