* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
@ 2010-05-16 17:35 Jochen Friedrich
2010-06-01 14:53 ` Kristoffer Ericson
2010-06-22 21:29 ` Wolfgang Denk
0 siblings, 2 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-05-16 17:35 UTC (permalink / raw)
To: u-boot
similar to 274737e5eb25b2bcd3af3a96da923effd543284f
This patch changes get_timer() for sa1100 to return the time since
'base' instead of the time since the counter was at zero.
Symptom seen is flash timeout errors when erasing or programming a
sector using the common cfi flash code.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/arm/cpu/sa1100/timer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 0207501..aea90ab 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -41,7 +41,7 @@ void reset_timer (void)
ulong get_timer (ulong base)
{
- return get_timer_masked ();
+ return get_timer_masked () - base;
}
void set_timer (ulong t)
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-05-16 17:35 [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base Jochen Friedrich
@ 2010-06-01 14:53 ` Kristoffer Ericson
2010-06-02 10:34 ` Jochen Friedrich
2010-06-22 21:29 ` Wolfgang Denk
1 sibling, 1 reply; 10+ messages in thread
From: Kristoffer Ericson @ 2010-06-01 14:53 UTC (permalink / raw)
To: u-boot
On Sun, May 16, 2010 at 07:35:18PM +0200, Jochen Friedrich wrote:
> similar to 274737e5eb25b2bcd3af3a96da923effd543284f
>
> This patch changes get_timer() for sa1100 to return the time since
> 'base' instead of the time since the counter was at zero.
>
> Symptom seen is flash timeout errors when erasing or programming a
> sector using the common cfi flash code.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
Did this get applied anywhere? Fail to see it inside the git log.
> arch/arm/cpu/sa1100/timer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
> index 0207501..aea90ab 100644
> --- a/arch/arm/cpu/sa1100/timer.c
> +++ b/arch/arm/cpu/sa1100/timer.c
> @@ -41,7 +41,7 @@ void reset_timer (void)
>
> ulong get_timer (ulong base)
> {
> - return get_timer_masked ();
> + return get_timer_masked () - base;
> }
>
> void set_timer (ulong t)
> --
> 1.7.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 10+ messages in thread* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-01 14:53 ` Kristoffer Ericson
@ 2010-06-02 10:34 ` Jochen Friedrich
2010-06-02 12:35 ` Kristoffer Ericson
2010-06-15 20:07 ` Kristoffer Ericson
0 siblings, 2 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-06-02 10:34 UTC (permalink / raw)
To: u-boot
Hi Kristoffer,
> Did this get applied anywhere? Fail to see it inside the git log.
Nope, I didn't get any response yet.
Thanks,
Jochen
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-02 10:34 ` Jochen Friedrich
@ 2010-06-02 12:35 ` Kristoffer Ericson
2010-06-15 20:07 ` Kristoffer Ericson
1 sibling, 0 replies; 10+ messages in thread
From: Kristoffer Ericson @ 2010-06-02 12:35 UTC (permalink / raw)
To: u-boot
On Wed, Jun 02, 2010 at 12:34:26PM +0200, Jochen Friedrich wrote:
> Hi Kristoffer,
>
> >Did this get applied anywhere? Fail to see it inside the git log.
>
> Nope, I didn't get any response yet.
Wolgang, there doesnt seem to be any submaintainers to push
patches to for SA11xx. For future reference, where should they go?
>
> Thanks,
> Jochen
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-02 10:34 ` Jochen Friedrich
2010-06-02 12:35 ` Kristoffer Ericson
@ 2010-06-15 20:07 ` Kristoffer Ericson
1 sibling, 0 replies; 10+ messages in thread
From: Kristoffer Ericson @ 2010-06-15 20:07 UTC (permalink / raw)
To: u-boot
On Wed, Jun 02, 2010 at 12:34:26PM +0200, Jochen Friedrich wrote:
> Hi Kristoffer,
>
> >Did this get applied anywhere? Fail to see it inside the git log.
>
> Nope, I didn't get any response yet.
Any idea on why SSP and sa1111 is non-working atm? I must be missing
setting something inside bootloader/kernel.
SA1111 is reported failure to set trigger mode 3, while SSP is just not working inside kernel.
>
> Thanks,
> Jochen
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-05-16 17:35 [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base Jochen Friedrich
2010-06-01 14:53 ` Kristoffer Ericson
@ 2010-06-22 21:29 ` Wolfgang Denk
2010-06-22 22:09 ` Andrew Dyer
1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2010-06-22 21:29 UTC (permalink / raw)
To: u-boot
Dear Jochen Friedrich,
In message <1274031318-22876-1-git-send-email-jochen@scram.de> you wrote:
> similar to 274737e5eb25b2bcd3af3a96da923effd543284f
>
> This patch changes get_timer() for sa1100 to return the time since
> 'base' instead of the time since the counter was at zero.
>
> Symptom seen is flash timeout errors when erasing or programming a
> sector using the common cfi flash code.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> arch/arm/cpu/sa1100/timer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
> index 0207501..aea90ab 100644
> --- a/arch/arm/cpu/sa1100/timer.c
> +++ b/arch/arm/cpu/sa1100/timer.c
> @@ -41,7 +41,7 @@ void reset_timer (void)
>
> ulong get_timer (ulong base)
> {
> - return get_timer_masked ();
> + return get_timer_masked () - base;
This patch is wrong. The get_timer() code is as it was designed to be.
If it is causing problems, then the caller must be fixed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Time is fluid ... like a river with currents, eddies, backwash.
-- Spock, "The City on the Edge of Forever", stardate 3134.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-22 21:29 ` Wolfgang Denk
@ 2010-06-22 22:09 ` Andrew Dyer
2010-06-22 22:34 ` Wolfgang Denk
2010-06-28 19:41 ` Jochen Friedrich
0 siblings, 2 replies; 10+ messages in thread
From: Andrew Dyer @ 2010-06-22 22:09 UTC (permalink / raw)
To: u-boot
On Tue, Jun 22, 2010 at 4:29 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Jochen Friedrich,
>
> In message <1274031318-22876-1-git-send-email-jochen@scram.de> you wrote:
>> similar to 274737e5eb25b2bcd3af3a96da923effd543284f
>>
>> This patch changes get_timer() for sa1100 to return the time since
>> 'base' instead of the time since the counter was at zero.
>>
>> Symptom seen is flash timeout errors when erasing or programming a
>> sector using the common cfi flash code.
>>
>> Signed-off-by: Jochen Friedrich <jochen@scram.de>
>> ---
>> ?arch/arm/cpu/sa1100/timer.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
>> index 0207501..aea90ab 100644
>> --- a/arch/arm/cpu/sa1100/timer.c
>> +++ b/arch/arm/cpu/sa1100/timer.c
>> @@ -41,7 +41,7 @@ void reset_timer (void)
>>
>> ?ulong get_timer (ulong base)
>> ?{
>> - ? ? return get_timer_masked ();
>> + ? ? return get_timer_masked () - base;
>
> This patch is wrong. The get_timer() code is as it was designed to be.
> If it is causing problems, then the caller must be fixed.
Hmmm. I put the same patch in a long time ago for imx for the same reason.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/45922
Looking at some other arm timer implementations they do it the same way.
I see the cfi_flash code now has reset_timer calls sprinkled through
it that should make the base offset functionality in the timer mostly
a nop (assuming it's implemented). Maybe the OP has old cfi_flash
code?
^ permalink raw reply [flat|nested] 10+ messages in thread* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-22 22:09 ` Andrew Dyer
@ 2010-06-22 22:34 ` Wolfgang Denk
2010-06-28 19:41 ` Jochen Friedrich
1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2010-06-22 22:34 UTC (permalink / raw)
To: u-boot
Dear Andrew,
In message <AANLkTim48UHND2wg0jCqs-EIZ2T_CGV-DUVatPzh6h6l@mail.gmail.com> you wrote:
>
> >> --- a/arch/arm/cpu/sa1100/timer.c
> >> +++ b/arch/arm/cpu/sa1100/timer.c
> >> @@ -41,7 +41,7 @@ void reset_timer (void)
> >>
> >> ulong get_timer (ulong base)
> >> {
> >> - return get_timer_masked ();
> >> + return get_timer_masked () - base;
> >
> > This patch is wrong. The get_timer() code is as it was designed to be.
> > If it is causing problems, then the caller must be fixed.
>
> Hmmm. I put the same patch in a long time ago for imx for the same reason.
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/45922
> Looking at some other arm timer implementations they do it the same way.
Hm... ouch...
Guess this needs fixing.
> I see the cfi_flash code now has reset_timer calls sprinkled through
> it that should make the base offset functionality in the timer mostly
> a nop (assuming it's implemented). Maybe the OP has old cfi_flash
> code?
Well, "sprinkled" - I see exactly two such calls. And I think these
are only needed because the implementer did not understand the
concept of how to implement a timeout using unsigned arithmentic in a
way that works even when the timer wraps around.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The Buddha, the Godhead, resides quite as comfortably in the circuits
of a digital computer or the gears of a cycle transmission as he does
at the top of a mountain or in the petals of a flower.
- R. Pirsig, "Zen and the Art of Motorcycle Maintenance"
^ permalink raw reply [flat|nested] 10+ messages in thread* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
2010-06-22 22:09 ` Andrew Dyer
2010-06-22 22:34 ` Wolfgang Denk
@ 2010-06-28 19:41 ` Jochen Friedrich
1 sibling, 0 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-06-28 19:41 UTC (permalink / raw)
To: u-boot
Hi Andrew,
> I see the cfi_flash code now has reset_timer calls sprinkled through
> it that should make the base offset functionality in the timer mostly
> a nop (assuming it's implemented). Maybe the OP has old cfi_flash
> code?
You're right. reset_timer() was added in commit
22d6c8faac4e9fa43232b0cf4da427ec14d72ad3, which was committed after
i submitted this patch.
Thanks,
Jochen
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base
@ 2010-04-02 16:23 Jochen Friedrich
0 siblings, 0 replies; 10+ messages in thread
From: Jochen Friedrich @ 2010-04-02 16:23 UTC (permalink / raw)
To: u-boot
similar to 274737e5eb25b2bcd3af3a96da923effd543284f
This patch changes get_timer() for sa1100 to return the time since
'base' instead of the time since the counter was at zero.
Symptom seen is flash timeout errors when erasing or programming a
sector using the common cfi flash code.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
cpu/sa1100/timer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpu/sa1100/timer.c b/cpu/sa1100/timer.c
index 0207501..aea90ab 100644
--- a/cpu/sa1100/timer.c
+++ b/cpu/sa1100/timer.c
@@ -41,7 +41,7 @@ void reset_timer (void)
ulong get_timer (ulong base)
{
- return get_timer_masked ();
+ return get_timer_masked () - base;
}
void set_timer (ulong t)
--
1.7.0.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-06-28 19:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-16 17:35 [U-Boot] [PATCH] sa1100 change get_timer(base) to return time since base Jochen Friedrich
2010-06-01 14:53 ` Kristoffer Ericson
2010-06-02 10:34 ` Jochen Friedrich
2010-06-02 12:35 ` Kristoffer Ericson
2010-06-15 20:07 ` Kristoffer Ericson
2010-06-22 21:29 ` Wolfgang Denk
2010-06-22 22:09 ` Andrew Dyer
2010-06-22 22:34 ` Wolfgang Denk
2010-06-28 19:41 ` Jochen Friedrich
-- strict thread matches above, loose matches on Subject: below --
2010-04-02 16:23 Jochen Friedrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox