[PATCH] dm: spi: Prevent setting a speed of 0 Hz in spi_post_probe
Tom Rini
trini at konsulko.com
Wed Mar 17 18:07:34 CET 2021
On Tue, Mar 16, 2021 at 01:33:57PM +0100, Michal Simek wrote:
> The commit 12bfb2e05fc2 ("dm: spi: prevent setting a speed of 0 Hz")
> changes default value from 0 to SPI_DEFAULT_SPEED_HZ but spi_post_probe()
> hasn't been updated in the same way. It should be also update to be aligned
> with previous patch.
>
> Fixes: 12bfb2e05fc2 ("dm: spi: prevent setting a speed of 0 Hz")
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> Reviewed-by: Pratyush Yadav <p.yadav at ti.com>
This breaks tests:
=> ut dm spi_claim_bus
Test: dm_test_spi_claim_bus: spi.c
SF: Detected m25p16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
SF: Detected m25p16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2625a00 (40000000), got 0x186a0 (100000)
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2625a00 (40000000), got 0x186a0 (100000)
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2faf080 (50000000), got 0x186a0 (100000)
Test: dm_test_spi_claim_bus: spi.c (flat tree)
SF: Detected m25p16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
SF: Detected m25p16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2625a00 (40000000), got 0x186a0 (100000)
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2625a00 (40000000), got 0x186a0 (100000)
test/dm/spi.c:120, dm_test_spi_switch_slaves(): slave_a->max_hz == bus_data->speed: Expected 0x2faf080 (50000000), got 0x186a0 (100000)
Failures: 6
So I assume a test needs updating too.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210317/df254d52/attachment.sig>
More information about the U-Boot
mailing list