diff options
author | Simon Goldschmidt | 2018-10-30 21:09:48 +0100 |
---|---|---|
committer | Simon Glass | 2018-11-20 19:14:22 -0700 |
commit | 12bfb2e05fc29bfbec7eb76ea8cc02e130268801 (patch) | |
tree | 05dd2716fc3975376ba204b216211318369584cc /tools/buildman | |
parent | b23644858bec1a21743debccb6643af7df5c48b4 (diff) |
dm: spi: prevent setting a speed of 0 Hz
When the device tree is missing a correct spi slave description below
the bus (compatible "spi-flash" or spi-max-frequency are missing),
the 'set_speed' callback can be called with 'speed' == 0 Hz.
At least with cadence qspi, this leads to a division by zero.
Prevent this by initializing speed to 100 kHz in this case (same
fallback value as is done in 'dm_spi_claim_bus') and issue a warning
to console.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
0 files changed, 0 insertions, 0 deletions