diff options
| author | Grzegorz Jaszczyk <[email protected]> | 2021-04-30 15:26:31 +0200 |
|---|---|---|
| committer | Stefan Roese <[email protected]> | 2021-05-16 06:48:45 +0200 |
| commit | 9c84159ce1c7c6410640de66f0d5e52af09a115e (patch) | |
| tree | b18323dcd5360590fbdb458b2c0a6ca74eb8bf5f /drivers | |
| parent | 562f8d5b36e4d35365aa9a545e4d11b5c2557ec1 (diff) | |
spi: kirkwood: prevent limiting speed to 0
After commit 1fe929ed497bcc8975be8d37383ebafd22b99dd2
("spi: kirkwood: prevent configuring speed exceeding max controller freq")
the spi frequency could be set to 0 on platform where spi-max-frequency
is not defined (e.g. on armada-388-gp). Prevent limiting speed in
mentioned cases.
Signed-off-by: Grzegorz Jaszczyk <[email protected]>
Tested-by: Kostya Porotchkin <[email protected]>
Reviewed-by: Marcin Wojtas <[email protected]>
Reviewed-by: Kostya Porotchkin <[email protected]>
Signed-off-by: Stefan Roese <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/spi/kirkwood_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index 063ed5f35a3..bc5da0a1e6e 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -115,7 +115,7 @@ static int mvebu_spi_set_speed(struct udevice *bus, uint hz) u32 data, divider; unsigned int spr, sppr; - if (hz > spi->max_hz) { + if (spi->max_hz && (hz > spi->max_hz)) { debug("%s: limit speed to the max_hz of the bus %d\n", __func__, spi->max_hz); hz = spi->max_hz; |
