summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch
new file mode 100644
index 00000000..fa007b38
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0043-can-flexcan-use-be32_to_cpup-to-handle-the-value-of-.patch
@@ -0,0 +1,44 @@
1From 06f8253f22e3ba961cc490243917206e2a8a8502 Mon Sep 17 00:00:00 2001
2From: Hui Wang <jason77.wang@gmail.com>
3Date: Wed, 27 Jun 2012 16:19:18 +0800
4Subject: [PATCH 43/46] can: flexcan: use be32_to_cpup to handle the value of
5 dt entry
6
7commit 85f2f834e85517307f13e30e630a5fc86f757cb5 upstream.
8
9The freescale arm i.MX series platform can support this driver, and
10usually the arm cpu works in the little endian mode by default, while
11device tree entry value is stored in big endian format, we should use
12be32_to_cpup() to handle them, after modification, it can work well
13both on the le cpu and be cpu.
14
15Cc: Shawn Guo <shawn.guo@linaro.org>
16Signed-off-by: Hui Wang <jason77.wang@gmail.com>
17Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 drivers/net/can/flexcan.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
24index e023379..e59d006 100644
25--- a/drivers/net/can/flexcan.c
26+++ b/drivers/net/can/flexcan.c
27@@ -933,12 +933,12 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
28 u32 clock_freq = 0;
29
30 if (pdev->dev.of_node) {
31- const u32 *clock_freq_p;
32+ const __be32 *clock_freq_p;
33
34 clock_freq_p = of_get_property(pdev->dev.of_node,
35 "clock-frequency", NULL);
36 if (clock_freq_p)
37- clock_freq = *clock_freq_p;
38+ clock_freq = be32_to_cpup(clock_freq_p);
39 }
40
41 if (!clock_freq) {
42--
431.7.10
44