public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Re: OMAP3 dual-mode timer: data aborts after fclk re-enable
       [not found] <8763zfutxw.fsf@vence.hilman.org>
@ 2007-12-04  2:34 ` Paul Walmsley
  2007-12-04  3:23   ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Walmsley @ 2007-12-04  2:34 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap, linux-omap-open-source

Hi Kevin,

On Mon, 3 Dec 2007, Kevin Hilman wrote:

> While working with the -rt patch + HRT on OMAP3, I'm seeing are data
> aborts during the first access to any timer register after the fclk is
> (re)enabled by dm_timer_set_source().

if this looks familiar,

<1>Unhandled fault: external abort on non-linefetch (0x1028) at 0xd9032010

perhaps this temporary patch -- not for git, there is a better 
implementation in the works -- might help?


- Paul

---
 arch/arm/mach-omap2/clock.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/clock.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/clock.c	2007-12-03 19:05:45.000000000 -0700
+++ linux-omap/arch/arm/mach-omap2/clock.c	2007-12-03 19:22:42.000000000 -0700
@@ -202,11 +202,11 @@
 	 * it and pull it into struct clk itself somehow.
 	 */
 	reg = clk->enable_reg;
-	if (reg == OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1) ||
-	    reg == OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2))
+	if ((((u32)reg & 0xff) >= CM_FCLKEN1) &&
+	    (((u32)reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
 		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
-	else if (reg == OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1) ||
-		 reg == OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2))
+	else if ((((u32)reg & 0xff) >= CM_ICLKEN1) &&
+		 (((u32)reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
 		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x00); /* CM_FCLKEN* */
 	else
 		return;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OMAP3 dual-mode timer: data aborts after fclk re-enable
  2007-12-04  2:34 ` OMAP3 dual-mode timer: data aborts after fclk re-enable Paul Walmsley
@ 2007-12-04  3:23   ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2007-12-04  3:23 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap, linux-omap-open-source

Paul Walmsley <paul@pwsan.com> writes:

> On Mon, 3 Dec 2007, Kevin Hilman wrote:
>
>> While working with the -rt patch + HRT on OMAP3, I'm seeing are data
>> aborts during the first access to any timer register after the fclk is
>> (re)enabled by dm_timer_set_source().
>
> if this looks familiar,
>
> <1>Unhandled fault: external abort on non-linefetch (0x1028) at 0xd9032010
>
> perhaps this temporary patch -- not for git, there is a better 
> implementation in the works -- might help?

Yup, that looks like it.   I should've asked sooner.

Kevin

 
> ---
>  arch/arm/mach-omap2/clock.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Index: linux-omap/arch/arm/mach-omap2/clock.c
> ===================================================================
> --- linux-omap.orig/arch/arm/mach-omap2/clock.c	2007-12-03 19:05:45.000000000 -0700
> +++ linux-omap/arch/arm/mach-omap2/clock.c	2007-12-03 19:22:42.000000000 -0700
> @@ -202,11 +202,11 @@
>  	 * it and pull it into struct clk itself somehow.
>  	 */
>  	reg = clk->enable_reg;
> -	if (reg == OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1) ||
> -	    reg == OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2))
> +	if ((((u32)reg & 0xff) >= CM_FCLKEN1) &&
> +	    (((u32)reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
>  		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
> -	else if (reg == OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1) ||
> -		 reg == OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2))
> +	else if ((((u32)reg & 0xff) >= CM_ICLKEN1) &&
> +		 (((u32)reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
>  		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x00); /* CM_FCLKEN* */
>  	else
>  		return;
> -
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-04  3:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8763zfutxw.fsf@vence.hilman.org>
2007-12-04  2:34 ` OMAP3 dual-mode timer: data aborts after fclk re-enable Paul Walmsley
2007-12-04  3:23   ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox