]> git.ipfire.org Git - thirdparty/u-boot.git/commit
spi: zynq_qspi: Correct baud rate divisor calculation
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 24 Jan 2018 11:50:33 +0000 (17:20 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 31 Jan 2018 12:15:41 +0000 (13:15 +0100)
commit18340a662aceff0a2b159fa9bf96dd4237d9b17f
tree96fe76527b1a1cfba205a0c6cb7e5d6f9d412f1a
parentf5b37f303f636c0f9243265a081c0130519f41d0
spi: zynq_qspi: Correct baud rate divisor calculation

This patch corrects the baud rate divisor calculation by
checking with max baud rate value and assigning default
baud rate value if it exceeds max value.
This fixes the issue of qspi flash detection as writing
the overflown value results in setting unintended bits
in the register.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/spi/zynq_qspi.c