
Add testcase for spi_claim_bus(), which checks that sandbox spi bus speed/mode settings are updated correctly when multiple slaves use the bus consecutively. The following configurations are used for the two spi slaves involved: * different max_hz / different modes * different max_hz / same modes * different modes / same max_hz
asm/test.h header is added in order to be able to retrieve the current speed/mode of the sandbox spi bus, via sandbox_spi_get_{speed, mode}.
Signed-off-by: Ovidiu Panait ovidiu.panait@windriver.com Reviewed-by: Simon Glass sjg@chromium.org ---
Changes in v2: - add reviewed-by tag - properly restore slave_a->mode from platdata: <snip> - slave_a->mode = slave_plat->max_hz; + slave_a->mode = slave_plat->mode;
test/dm/spi.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+)
Applied to u-boot-dm/next, thanks!