spi: aspeed: Fix division by zero
When using the normal read operation for data transfers, the dummy bus width is zero. In that case, they are no dummy bytes to transfer and setting the dummy field in the controller register becomes useless. Issue was found on a custom "Bifrost" board based on the AST2500 SoC and using a MX25L51245GMI-08G SPI Flash. Reported-by: Ian Woloschin <ian.woloschin@akamai.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Tested-by: Ian Woloschin <iwolosch@akamai.com> Fixes: 9da06d7b ("spi: aspeed: Add support for direct mapping") Signed-off-by: Cédric Le Goater <clg@kaod.org> Link: https://lore.kernel.org/r/20220622161617.3719096-3-clg@kaod.orgSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment