Hi Simon, On 18 January 2018 at 01:15, Simon Goldschmidt <sgoldschm...@de.pepperl-fuchs.com> wrote: > When the device tree is missing a correct spi slave description below > the bus, 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, as is > done in 'dm_spi_claim_bus'. > > Signed-off-by: Simon Goldschmidt <sgoldschm...@de.pepperl-fuchs.com> > --- > > drivers/spi/spi-uclass.c | 2 ++ > 1 file changed, 2 insertions(+) >
Another option is to have a sensible default when reading from the DT fails. See spi_slave_ofdata_to_platdata() - you can add the default there. Would that work? Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot