[3.11.y.z extended stable] Patch "can: flexcan: use correct clock as base for bit rate calculation" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Dec 11 14:40:58 UTC 2013
This is a note to let you know that I have just added a patch titled
can: flexcan: use correct clock as base for bit rate calculation
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 0d40681f35a066c79e27bcae3654ad10e0cbf431 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl at pengutronix.de>
Date: Mon, 25 Nov 2013 22:15:20 +0100
Subject: can: flexcan: use correct clock as base for bit rate calculation
commit 1a3e5173f5e72cbf7f0c8927b33082e361c16d72 upstream.
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.
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/net/can/flexcan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index cf3c93f..eb6b191 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1010,7 +1010,6 @@ static int flexcan_probe(struct platform_device *pdev)
err = PTR_ERR(clk_ipg);
goto failed_clock;
}
- clock_freq = clk_get_rate(clk_ipg);
clk_per = devm_clk_get(&pdev->dev, "per");
if (IS_ERR(clk_per)) {
@@ -1018,6 +1017,7 @@ static int flexcan_probe(struct platform_device *pdev)
err = PTR_ERR(clk_per);
goto failed_clock;
}
+ clock_freq = clk_get_rate(clk_per);
}
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
1.8.3.2
More information about the kernel-team
mailing list