diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2020-12-14 20:06:47 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-23 06:39:25 +0300 |
commit | 1dc53ce71d961a0404c0d785fb0b66f351a7b730 (patch) | |
tree | a7710af87cc6f698b8d8ea33391ef370d38f4ef7 /test/dm | |
parent | 1f6d618bb16e10bdba5cb08733e228367662b12c (diff) | |
download | u-boot-1dc53ce71d961a0404c0d785fb0b66f351a7b730.tar.xz |
sandbox: test: Add a second SPI slave on sandbox_spi bus
Place a second spi slave on the sandbox_spi bus, to be used by the
spi_claim_bus() testcase we are about to introduce. We need to make sure
that jumping between slaves calling spi_claim_bus() sets the bus speed and
mode appropriately. Use different max-hz and mode properties for this new
slave.
Also, update sandbox_spi cs_info call to allow activity on CS0/CS1 and
adapt dm_test_spi_find() testcase for this new setup.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dm/spi.c b/test/dm/spi.c index b767cf9c4a..59bcedf293 100644 --- a/test/dm/spi.c +++ b/test/dm/spi.c @@ -22,7 +22,7 @@ static int dm_test_spi_find(struct unit_test_state *uts) struct sandbox_state *state = state_get_current(); struct spi_slave *slave; struct udevice *bus, *dev; - const int busnum = 0, cs = 0, mode = 0, speed = 1000000, cs_b = 1; + const int busnum = 0, cs = 0, mode = 0, speed = 1000000, cs_b = 2; struct spi_cs_info info; ofnode node; |