From: Tom Rini Date: Wed, 17 Mar 2021 13:07:34 -0400 Subject: [PATCH] dm: spi: Prevent setting a speed of 0 Hz in spi_post_probe In-Reply-To: <00221cd6fb5b732c5f742ff332fd4e2da85f88d9.1615898035.git.michal.simek@xilinx.com> References: <00221cd6fb5b732c5f742ff332fd4e2da85f88d9.1615898035.git.michal.simek@xilinx.com> Message-ID: <20210317170734.GA29335@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Reviewed-by: Pratyush Yadav 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: