2013-08-01 11:33:47

by Chen Baozi

[permalink] [raw]
Subject: [PATCH] ARM: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD

The denominator should be load from INCREMENTOR_DENUMERATOR_RELOAD_OFFSET
rather than INCREMENTER_NUMERATOR_OFFSET.

Signed-off-by: Chen Baozi <[email protected]>
---
arch/arm/mach-omap2/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b37e1fc..9265e03 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -537,7 +537,7 @@ static void __init realtime_counter_init(void)
reg |= num;
__raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET);

- reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
+ reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
NUMERATOR_DENUMERATOR_MASK;
reg |= den;
__raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
--
1.8.1.4


2013-08-05 15:26:40

by Chen Baozi

[permalink] [raw]
Subject: Re: [PATCH] ARM: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD

ping?

On Aug 1, 2013, at 7:27 PM, Chen Baozi <[email protected]> wrote:

> The denominator should be load from INCREMENTOR_DENUMERATOR_RELOAD_OFFSET
> rather than INCREMENTER_NUMERATOR_OFFSET.
>
> Signed-off-by: Chen Baozi <[email protected]>
> ---
> arch/arm/mach-omap2/timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index b37e1fc..9265e03 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -537,7 +537,7 @@ static void __init realtime_counter_init(void)
> reg |= num;
> __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET);
>
> - reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
> + reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
> NUMERATOR_DENUMERATOR_MASK;
> reg |= den;
> __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
> --
> 1.8.1.4
>

2013-08-07 11:09:51

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] ARM: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD

* Chen Baozi <[email protected]> [130805 08:33]:
> ping?
>
> On Aug 1, 2013, at 7:27 PM, Chen Baozi <[email protected]> wrote:
>
> > The denominator should be load from INCREMENTOR_DENUMERATOR_RELOAD_OFFSET
> > rather than INCREMENTER_NUMERATOR_OFFSET.

Maybe describe what exactly happens without this fix?

Also we should get few acks for this for the -rc series.

Regards,

Tony

> > Signed-off-by: Chen Baozi <[email protected]>
> > ---
> > arch/arm/mach-omap2/timer.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index b37e1fc..9265e03 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -537,7 +537,7 @@ static void __init realtime_counter_init(void)
> > reg |= num;
> > __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET);
> >
> > - reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
> > + reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
> > NUMERATOR_DENUMERATOR_MASK;
> > reg |= den;
> > __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
> > --
> > 1.8.1.4
> >
>

2013-08-07 13:35:50

by Chen Baozi

[permalink] [raw]
Subject: Re: [PATCH] ARM: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD


On Aug 7, 2013, at 7:09 PM, Tony Lindgren <[email protected]> wrote:

> * Chen Baozi <[email protected]> [130805 08:33]:
>> ping?
>>
>> On Aug 1, 2013, at 7:27 PM, Chen Baozi <[email protected]> wrote:
>>
>>> The denominator should be load from INCREMENTOR_DENUMERATOR_RELOAD_OFFSET
>>> rather than INCREMENTER_NUMERATOR_OFFSET.
>
> Maybe describe what exactly happens without this fix?

I think it is more likely a typo, since
INCREMENTER_DENUMERATOR_RELOAD[23:17] is reserved. It seems
that it won't make much trouble without this fix because
the useful [11:0] bit is mask and set the right value later.

Cheers,

Baozi

>
> Also we should get few acks for this for the -rc series.
>
> Regards,
>
> Tony
>
>>> Signed-off-by: Chen Baozi <[email protected]>
>>> ---
>>> arch/arm/mach-omap2/timer.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index b37e1fc..9265e03 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -537,7 +537,7 @@ static void __init realtime_counter_init(void)
>>> reg |= num;
>>> __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET);
>>>
>>> - reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
>>> + reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
>>> NUMERATOR_DENUMERATOR_MASK;
>>> reg |= den;
>>> __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
>>> --
>>> 1.8.1.4
>>>
>>