]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: use correct clock as base for bit rate calculation
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 25 Nov 2013 21:15:20 +0000 (22:15 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 26 Nov 2013 14:39:47 +0000 (15:39 +0100)
commit1bbeb1465fcc2dbaf5fd2ee827a68e16edfd911e
tree83e4fbb0eea86854c6861cc42d52a74b9900e5fb
parentede5f85b5e9996b1e822a71463c209ad9d11931b
can: flexcan: use correct clock as base for bit rate calculation

The flexcan IP core uses the peripheral clock ("per") as basic clock for the
bit timing calculation. However the driver uses the the wrong clock ("ipg").
This leads to wrong bit rates if the rates on both clock are different.

This patch fixes the problem by using the correct clock for the bit rate
calculation.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c