From: Tony Lindgren <tony@atomide.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Tarun Kanti DebBarma <tarun.kanti@ti.com>
Subject: Re: [PATCH v4 11/12] ARM: OMAP1: DMTIMER: fix broken timer clock source selection
Date: Tue, 17 Apr 2012 14:48:03 -0700 [thread overview]
Message-ID: <20120417214802.GH21106@atomide.com> (raw)
In-Reply-To: <20120411003559.27059.1315.stgit@dusk>
* Paul Walmsley <paul@pwsan.com> [120410 17:41]:
> DMTIMER source selection on OMAP1 is broken. omap1_dm_timer_set_src()
> tries to use __raw_{read,write}l() to read from and write to physical
> addresses, but those functions take virtual addresses.
>
> sparse caught this:
>
> arch/arm/mach-omap1/timer.c:50:13: warning: incorrect type in argument 1 (different base types)
> arch/arm/mach-omap1/timer.c:50:13: expected void const volatile [noderef] <asn:2>*<noident>
> arch/arm/mach-omap1/timer.c:50:13: got unsigned int
> arch/arm/mach-omap1/timer.c:52:9: warning: incorrect type in argument 1 (different base types)
> arch/arm/mach-omap1/timer.c:52:9: expected void const volatile [noderef] <asn:2>*<noident>
> arch/arm/mach-omap1/timer.c:52:9: got unsigned int
>
> Fix by using omap_{read,writel}(), just like the other users of the
> MOD_CONF_CTRL_1 register in the OMAP1 codebase. Of course, in the long term,
> removing omap_{read,write}l() is the appropriate thing to do; but
> this will take some work to do this cleanly.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Uhh looks like this was caused by commit 97933d6 (ARM: OMAP1: dmtimer: conversion
to platform devices) moving code and changing it :(
I'll pick this to fixes.
Tony
> ---
> arch/arm/mach-omap1/timer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> index 5536e04..64c65bc 100644
> --- a/arch/arm/mach-omap1/timer.c
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
> int n = (pdev->id - 1) << 1;
> u32 l;
>
> - l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
> + l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
> l |= source << n;
> - __raw_writel(l, MOD_CONF_CTRL_1);
> + omap_writel(l, MOD_CONF_CTRL_1);
>
> return 0;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 11/12] ARM: OMAP1: DMTIMER: fix broken timer clock source selection
Date: Tue, 17 Apr 2012 14:48:03 -0700 [thread overview]
Message-ID: <20120417214802.GH21106@atomide.com> (raw)
In-Reply-To: <20120411003559.27059.1315.stgit@dusk>
* Paul Walmsley <paul@pwsan.com> [120410 17:41]:
> DMTIMER source selection on OMAP1 is broken. omap1_dm_timer_set_src()
> tries to use __raw_{read,write}l() to read from and write to physical
> addresses, but those functions take virtual addresses.
>
> sparse caught this:
>
> arch/arm/mach-omap1/timer.c:50:13: warning: incorrect type in argument 1 (different base types)
> arch/arm/mach-omap1/timer.c:50:13: expected void const volatile [noderef] <asn:2>*<noident>
> arch/arm/mach-omap1/timer.c:50:13: got unsigned int
> arch/arm/mach-omap1/timer.c:52:9: warning: incorrect type in argument 1 (different base types)
> arch/arm/mach-omap1/timer.c:52:9: expected void const volatile [noderef] <asn:2>*<noident>
> arch/arm/mach-omap1/timer.c:52:9: got unsigned int
>
> Fix by using omap_{read,writel}(), just like the other users of the
> MOD_CONF_CTRL_1 register in the OMAP1 codebase. Of course, in the long term,
> removing omap_{read,write}l() is the appropriate thing to do; but
> this will take some work to do this cleanly.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Uhh looks like this was caused by commit 97933d6 (ARM: OMAP1: dmtimer: conversion
to platform devices) moving code and changing it :(
I'll pick this to fixes.
Tony
> ---
> arch/arm/mach-omap1/timer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> index 5536e04..64c65bc 100644
> --- a/arch/arm/mach-omap1/timer.c
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
> int n = (pdev->id - 1) << 1;
> u32 l;
>
> - l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
> + l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
> l |= source << n;
> - __raw_writel(l, MOD_CONF_CTRL_1);
> + omap_writel(l, MOD_CONF_CTRL_1);
>
> return 0;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-04-17 21:48 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 0:35 [PATCH v4 00/12] ARM: OMAP: resolve some warnings Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 01/12] ARM: OMAP2+: declare file-local functions as static Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 8:43 ` Arnd Bergmann
2012-04-11 8:43 ` Arnd Bergmann
2012-04-11 18:16 ` Paul Walmsley
2012-04-11 18:16 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 02/12] ARM: OMAP: add includes for missing prototypes Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 03/12] ARM: OMAP1: OCPI: move to mach-omap1/ Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 04/12] ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 7:49 ` Roland Stigge
2012-04-11 7:49 ` Roland Stigge
2012-04-11 18:19 ` Paul Walmsley
2012-04-11 18:19 ` Paul Walmsley
2012-04-11 18:26 ` Felipe Balbi
2012-04-11 18:26 ` Felipe Balbi
[not found] ` <20120411182634.GA9396-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-04-11 19:01 ` Paul Walmsley
2012-04-11 19:01 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 05/12] ARM: OMAP2+: GPMC: resolve type-conversion warning from sparse Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 06/12] ARM: OMAP: fix 'using plain integer as NULL pointer' sparse warnings Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 07/12] ARM: OMAP: OCM RAM: use memset_io() when clearing SRAM Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 08/12] ARM: OMAP: DMA: use constant array maximum, drop some LCD DMA code Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 09/12] ARM: OMAP: USB: remove unnecessary sideways include Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 0:35 ` [PATCH v4 10/12] ARM: OMAP1: board files: deduplicate and clean some NAND-related code Paul Walmsley
2012-04-11 0:35 ` Paul Walmsley
2012-04-11 9:12 ` Arnd Bergmann
2012-04-11 9:12 ` Arnd Bergmann
2012-04-11 18:45 ` Paul Walmsley
2012-04-11 18:45 ` Paul Walmsley
2012-04-11 0:36 ` [PATCH v4 11/12] ARM: OMAP1: DMTIMER: fix broken timer clock source selection Paul Walmsley
2012-04-11 0:36 ` Paul Walmsley
2012-04-17 21:48 ` Tony Lindgren [this message]
2012-04-17 21:48 ` Tony Lindgren
2012-04-17 21:53 ` Paul Walmsley
2012-04-17 21:53 ` Paul Walmsley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120417214802.GH21106@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tarun.kanti@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.