spi: altera: Zap endless loop
authorMarek Vasut <marex@denx.de>
Wed, 22 Oct 2014 19:56:01 +0000 (21:56 +0200)
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Mon, 27 Oct 2014 17:07:03 +0000 (22:37 +0530)
commit80d73338080c83e17fbf3f844052ec71d03ecd13
tree636e9c4eefe012c66d1072e1fc80f82e4115a978
parent37dcc130e0c804da6ad50bf273d0d737cfe9cf8f
spi: altera: Zap endless loop

The driver contained an endless loop when waiting for TX completion,
this is a bad idea since if the hardware fails, the loop might spin
forever. Add timeout and handle it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Pavel Machek <pavel@denx.de>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/spi/altera_spi.c