diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch new file mode 100644 index 00000000..b7a22c41 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0005-ARM-OMAP1-DMTIMER-fix-broken-timer-clock-source-sele.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 69c74a3f01d30c6dd44991f6413a4f317f4591a7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Walmsley <paul@pwsan.com> | ||
3 | Date: Tue, 10 Apr 2012 18:36:02 -0600 | ||
4 | Subject: [PATCH 005/165] ARM: OMAP1: DMTIMER: fix broken timer clock source | ||
5 | selection | ||
6 | |||
7 | commit 6aaec67da1e41a0752a2b903b989e73b9f02e182 upstream. | ||
8 | |||
9 | DMTIMER source selection on OMAP1 is broken. omap1_dm_timer_set_src() | ||
10 | tries to use __raw_{read,write}l() to read from and write to physical | ||
11 | addresses, but those functions take virtual addresses. | ||
12 | |||
13 | sparse caught this: | ||
14 | |||
15 | arch/arm/mach-omap1/timer.c:50:13: warning: incorrect type in argument 1 (different base types) | ||
16 | arch/arm/mach-omap1/timer.c:50:13: expected void const volatile [noderef] <asn:2>*<noident> | ||
17 | arch/arm/mach-omap1/timer.c:50:13: got unsigned int | ||
18 | arch/arm/mach-omap1/timer.c:52:9: warning: incorrect type in argument 1 (different base types) | ||
19 | arch/arm/mach-omap1/timer.c:52:9: expected void const volatile [noderef] <asn:2>*<noident> | ||
20 | arch/arm/mach-omap1/timer.c:52:9: got unsigned int | ||
21 | |||
22 | Fix by using omap_{read,writel}(), just like the other users of the | ||
23 | MOD_CONF_CTRL_1 register in the OMAP1 codebase. Of course, in the long term, | ||
24 | removing omap_{read,write}l() is the appropriate thing to do; but | ||
25 | this will take some work to do this cleanly. | ||
26 | |||
27 | Looks like this was caused by 97933d6 (ARM: OMAP1: dmtimer: conversion | ||
28 | to platform devices) that dangerously moved code and changed it in | ||
29 | the same patch. | ||
30 | |||
31 | Signed-off-by: Paul Walmsley <paul@pwsan.com> | ||
32 | Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> | ||
33 | [tony@atomide.com: updated comments to include the breaking commit] | ||
34 | Signed-off-by: Tony Lindgren <tony@atomide.com> | ||
35 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
36 | --- | ||
37 | arch/arm/mach-omap1/timer.c | 4 ++-- | ||
38 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
39 | |||
40 | diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c | ||
41 | index 6e90665..fb202af 100644 | ||
42 | --- a/arch/arm/mach-omap1/timer.c | ||
43 | +++ b/arch/arm/mach-omap1/timer.c | ||
44 | @@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev, | ||
45 | int n = (pdev->id - 1) << 1; | ||
46 | u32 l; | ||
47 | |||
48 | - l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); | ||
49 | + l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); | ||
50 | l |= source << n; | ||
51 | - __raw_writel(l, MOD_CONF_CTRL_1); | ||
52 | + omap_writel(l, MOD_CONF_CTRL_1); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | -- | ||
57 | 1.7.7.6 | ||
58 | |||