spi: imx: set spi_bus_clk for mx1, mx31 and mx35
authorMartin Kaiser <martin@kaiser.cx>
Thu, 1 Sep 2016 20:38:40 +0000 (22:38 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Sep 2016 17:06:11 +0000 (18:06 +0100)
commit2636ba8fa39915c7b8d73166961ebbb4c14251cd
tree5c6e9651bc9131ca8ce972f59808509940ff1704
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
spi: imx: set spi_bus_clk for mx1, mx31 and mx35

Modify spi_imx_clkdiv_2() to return the resulting bus clock frequency
when the selected clock divider is applied. Set spi_imx->spi_bus_clk to
this frequency.

If spi_bus_clk is unset, spi_imx_calculate_timeout() causes a
division by 0.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c