All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] 85xx io out functions need sync after write.
@ 2007-09-26 21:35 Ed Swarthout
  2007-09-26 21:50 ` Andy Fleming
  2007-09-27  5:31 ` Stefan Roese
  0 siblings, 2 replies; 5+ messages in thread
From: Ed Swarthout @ 2007-09-26 21:35 UTC (permalink / raw)
  To: u-boot

This fixes the mc146818 rtc_read/write functions for 85xx.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
---

 cpu/mpc85xx/start.S |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
index 2c98c2a..5d65190 100644
--- a/cpu/mpc85xx/start.S
+++ b/cpu/mpc85xx/start.S
@@ -701,6 +701,7 @@ in8:
 	.globl	out8
 out8:
 	stb	r4,0x0000(r3)
+	sync
 	blr
 
 /*------------------------------------------------------------------------------- */
@@ -710,6 +711,7 @@ out8:
 	.globl	out16
 out16:
 	sth	r4,0x0000(r3)
+	sync
 	blr
 
 /*------------------------------------------------------------------------------- */
@@ -719,6 +721,7 @@ out16:
 	.globl	out16r
 out16r:
 	sthbrx	r4,r0,r3
+	sync
 	blr
 
 /*------------------------------------------------------------------------------- */
@@ -728,6 +731,7 @@ out16r:
 	.globl	out32
 out32:
 	stw	r4,0x0000(r3)
+	sync
 	blr
 
 /*------------------------------------------------------------------------------- */
@@ -737,6 +741,7 @@ out32:
 	.globl	out32r
 out32r:
 	stwbrx	r4,r0,r3
+	sync
 	blr
 
 /*------------------------------------------------------------------------------- */
-- 
1.5.3.1.65.g47184

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

* [U-Boot-Users] [PATCH] 85xx io out functions need sync after write.
  2007-09-26 21:35 [U-Boot-Users] [PATCH] 85xx io out functions need sync after write Ed Swarthout
@ 2007-09-26 21:50 ` Andy Fleming
  2007-09-27  5:31 ` Stefan Roese
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Fleming @ 2007-09-26 21:50 UTC (permalink / raw)
  To: u-boot


On Sep 26, 2007, at 16:35, Ed Swarthout wrote:

> This fixes the mc146818 rtc_read/write functions for 85xx.
>
> Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>

applied, thanks

Andy

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

* [U-Boot-Users] [PATCH] 85xx io out functions need sync after write.
  2007-09-26 21:35 [U-Boot-Users] [PATCH] 85xx io out functions need sync after write Ed Swarthout
  2007-09-26 21:50 ` Andy Fleming
@ 2007-09-27  5:31 ` Stefan Roese
  2007-09-27  6:25   ` Swarthout Edward L-SWARTHOU
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2007-09-27  5:31 UTC (permalink / raw)
  To: u-boot

On Wednesday 26 September 2007, Ed Swarthout wrote:
> This fixes the mc146818 rtc_read/write functions for 85xx.
>
> Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
> ---
>
>  cpu/mpc85xx/start.S |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
> index 2c98c2a..5d65190 100644
> --- a/cpu/mpc85xx/start.S
> +++ b/cpu/mpc85xx/start.S
> @@ -701,6 +701,7 @@ in8:
>  	.globl	out8
>  out8:
>  	stb	r4,0x0000(r3)
> +	sync

Another way would be to use the out_be32() and friends functions defined in 
asm-ppc/io.h. They already have the sync/barrier included and are recommened 
for accessing peripheral devices.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot-Users] [PATCH] 85xx io out functions need sync after write.
  2007-09-27  5:31 ` Stefan Roese
@ 2007-09-27  6:25   ` Swarthout Edward L-SWARTHOU
  2007-09-27  8:41     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Swarthout Edward L-SWARTHOU @ 2007-09-27  6:25 UTC (permalink / raw)
  To: u-boot

From: Stefan Roese
>
> On Wednesday 26 September 2007, Ed Swarthout wrote:
> > This fixes the mc146818 rtc_read/write functions for 85xx.
> >
> > --- a/cpu/mpc85xx/start.S
> >  out8:
> >  	stb	r4,0x0000(r3)
> > +	sync
> 
> Another way would be to use the out_be32() and friends functions 
> defined in asm-ppc/io.h. They already have the sync/barrier included 
> and are recommened for accessing peripheral devices.

Agreed, but grep finds 132 calls to out[813] in driver and rtc files.

I only noticed the missing sync's when debugging a failing "date" 
command that uses rtc/mc145818.

-Ed

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

* [U-Boot-Users] [PATCH] 85xx io out functions need sync after write.
  2007-09-27  6:25   ` Swarthout Edward L-SWARTHOU
@ 2007-09-27  8:41     ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2007-09-27  8:41 UTC (permalink / raw)
  To: u-boot

In message <B52955765C54604CB1A62A9967F22C73026F7696@az33exm20.fsl.freescale.net> you wrote:
>
> > Another way would be to use the out_be32() and friends functions 
> > defined in asm-ppc/io.h. They already have the sync/barrier included 
> > and are recommened for accessing peripheral devices.
> 
> Agreed, but grep finds 132 calls to out[813] in driver and rtc files.

As Stefan already pointed out on #u-boot, this is just an indication
that this is a pretty common error.


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
All easy problems have already been solved.

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

end of thread, other threads:[~2007-09-27  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 21:35 [U-Boot-Users] [PATCH] 85xx io out functions need sync after write Ed Swarthout
2007-09-26 21:50 ` Andy Fleming
2007-09-27  5:31 ` Stefan Roese
2007-09-27  6:25   ` Swarthout Edward L-SWARTHOU
2007-09-27  8:41     ` Wolfgang Denk

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.