Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-22 Thread Simon Goldschmidt
On 22.01.2018 07:01, Jagan Teki wrote: On Thu, Jan 18, 2018 at 1:45 PM, Simon Goldschmidt 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 ze

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-22 Thread Simon Goldschmidt
On 22.01.2018 06:04, Vignesh R wrote: On Thursday 18 January 2018 01:45 PM, Simon Goldschmidt 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

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-22 Thread Simon Goldschmidt
On 22.01.2018 01:29, Simon Glass wrote: Hi Simon, On 18 January 2018 at 01:15, Simon Goldschmidt 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 divisi

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-21 Thread Jagan Teki
On Thu, Jan 18, 2018 at 1:45 PM, Simon Goldschmidt 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

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-21 Thread Vignesh R
On Thursday 18 January 2018 01:45 PM, Simon Goldschmidt 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 initi

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-21 Thread Simon Glass
Hi Simon, On 18 January 2018 at 01:15, Simon Goldschmidt 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 initi

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-18 Thread Michael Nazzareno Trimarchi
Hi On Thu, Jan 18, 2018 at 9:27 AM, Simon Goldschmidt wrote: > On 18.01.2018 09:23, Michael Nazzareno Trimarchi wrote: >> >> Hi >> >> On Thu, Jan 18, 2018 at 9:15 AM, Simon Goldschmidt >> wrote: >>> >>> When the device tree is missing a correct spi slave description below >>> the bus, the 'set_s

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-18 Thread Simon Goldschmidt
On 18.01.2018 09:23, Michael Nazzareno Trimarchi wrote: Hi On Thu, Jan 18, 2018 at 9:15 AM, Simon Goldschmidt 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 lead

Re: [U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-18 Thread Michael Nazzareno Trimarchi
Hi On Thu, Jan 18, 2018 at 9:15 AM, Simon Goldschmidt 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 initiali

[U-Boot] [PATCH] dm: spi: prevent setting a speed of 0 Hz

2018-01-18 Thread Simon Goldschmidt
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'. S