Skip to contentSkip to conversation

smc91111: use SSYNC() rather than asm(ssync) for Blackfin

PATCH New Mike Frysinger 2 participants 2 messages Feb 25, 2008 – Mar 25, 2008 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smc91111: use SSYNC() rather than asm(ssync) for Blackfin

Since the "ssync" instruction may have hardware anomalies associated with it, have the smc91111 driver use the SSYNC macro rather than invoking it directly. We workaround all the anomalies via this macro.

---
 drivers/net/smc91111.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/smc91111.h +2 -2
index d03cbc3..8dcbb3e 100644
@@ -186,7 +186,7 @@ typedef unsigned long int 		dword;
 #ifdef CONFIG_ADNPESC1
 #define	SMC_inw(r) 	(*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1))))
 #elif CONFIG_BLACKFIN
-#define	SMC_inw(r) 	({ word __v = (*((volatile word *)(SMC_BASE_ADDRESS+(r)))); asm("ssync;"); __v;})
+#define	SMC_inw(r) 	({ word __v = (*((volatile word *)(SMC_BASE_ADDRESS+(r)))); SSYNC(); __v;})
 #else
 #define	SMC_inw(r) 	(*((volatile word *)(SMC_BASE_ADDRESS+(r))))
 #endif
@@ -195,7 +195,7 @@ typedef unsigned long int 		dword;
 #ifdef CONFIG_ADNPESC1
 #define	SMC_outw(d,r)	(*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1))) = d)
 #elif CONFIG_BLACKFIN
-#define	SMC_outw(d,r)	{(*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d);asm("ssync;");}
+#define	SMC_outw(d,r)	{(*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d); SSYNC();}
 #else
 #define	SMC_outw(d,r)	(*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d)
 #endif
Signature · 1 line
1.5.4.2
#1 lore raw

PATCH 1/1 smc91111: use SSYNC() rather than asm(ssync) for Blackfin

Quoted 8 lines · In message <[email protected]> you wrote:

Since the "ssync" instruction may have hardware anomalies associated with it, have the smc91111 driver use the SSYNC macro rather than invoking it directly. We workaround all the anomalies via this macro.

---
 drivers/net/smc91111.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
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
Madness has no purpose.  Or reason.  But it may have a goal.
	-- Spock, "The Alternative Factor", stardate 3088.7