diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-16 14:52:22 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-30 14:25:41 -0700 |
commit | d8e9a93895fb3ad710963ddef6a4cc7c43bd65f6 (patch) | |
tree | 1696ef961329c3eba9122bda0d0f7cb284165587 /arch/sandbox | |
parent | 3096ee866e7388277ad3968d9c7ea704589dedea (diff) | |
download | u-boot-d8e9a93895fb3ad710963ddef6a4cc7c43bd65f6.tar.gz |
cros_ec: Add a function for the hello message
This is used several times in this file. Put it in a function to avoid
code duplication.
Also add a test for this function. There are no cros_ec tests at present,
so it is time to update the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/include/asm/test.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 05f66f700c..8363ca7319 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -58,6 +58,12 @@ enum { }; /** + */ +enum cros_ec_test_t { + CROSECT_BREAK_HELLO = BIT(1), +}; + +/** * sandbox_i2c_set_test_mode() - set test mode for running unit tests * * See sandbox_i2c_xfer() for the behaviour changes. @@ -260,4 +266,12 @@ uint sandbox_pci_read_bar(u32 barval, int type, uint size); */ void sandbox_set_enable_memio(bool enable); +/** + * sandbox_cros_ec_set_test_flags() - Set behaviour for testing purposes + * + * @dev: Device to check + * @flags: Flags to control behaviour (CROSECT_...) + */ +void sandbox_cros_ec_set_test_flags(struct udevice *dev, uint flags); + #endif |