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)
commit1a3e5173f5e72cbf7f0c8927b33082e361c16d72
tree83e4fbb0eea86854c6861cc42d52a74b9900e5fb
parent7ee330c7b3b738847bf297912b371bbcec3bc994
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