mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
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. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
77ff7b7444
commit
8a30b47009
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue