From: Marc Kleine-Budde Date: Fri, 28 Feb 2014 16:08:21 +0000 (+0100) Subject: can: flexcan: fix transition from and to freeze mode in chip_{,un}freeze X-Git-Tag: v3.14-rc6~30^2~3^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1aa1c7a2165b44ecce66286a3095cc6c7667d1c;p=pandora-kernel.git can: flexcan: fix transition from and to freeze mode in chip_{,un}freeze This patch factors out freeze and unfreeze of the CAN core into seperate functions. Experiments have shown that the transition from and to freeze mode may take several microseconds, especially the time entering the freeze mode depends on the current bitrate. This patch adds a while loop which polls the Freeze Mode ACK bit (FRZ_ACK) that indicates a successfull mode change. If the function runs into a timeout a error value is returned. Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- Reading git-diff-tree failed