]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: mpc8xxx: Use get_timer
authorMario Six <mario.six@gdsys.cc>
Sun, 28 Apr 2019 20:28:52 +0000 (01:58 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 10 Jun 2019 12:29:49 +0000 (17:59 +0530)
commit67adbaef5a842ebc8f58f9c30baa97e8d99fa4a6
treed91ad6c5ae2cc6f7cb403229d45bf97923c5486d
parentf6fcad5f2a889db6fb26afd71ed92dde00cb85e1
spi: mpc8xxx: Use get_timer

The comment before the transmission loop in conjunction with the
definition of SPI_TIMEOUT as 1000 implies that the loop is supposed to
have a timeout value of 1000 ms. But since there is no mdelay(1) or
similar in the loop body, the loop just runs 1000 times, without regard
for the time elapsed.

To correct this, use the standard get_timer functionality to properly
time out the loop after 1000 ms.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/mpc8xxx_spi.c