diff options
author | Haiying Wang <Haiying.Wang@freescale.com> | 2007-02-21 16:52:31 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-02-21 16:52:31 +0100 |
commit | 3a197b2fe49d6fa03978e60af2394efe9c70b527 (patch) | |
tree | 829eea16bc1c69fbf27545788bb104cda033f3e8 /include/asm-nios2 | |
parent | da04995c7dc6772013a9a0dc5c767f190c402478 (diff) | |
download | u-boot-imx-3a197b2fe49d6fa03978e60af2394efe9c70b527.zip u-boot-imx-3a197b2fe49d6fa03978e60af2394efe9c70b527.tar.gz u-boot-imx-3a197b2fe49d6fa03978e60af2394efe9c70b527.tar.bz2 |
[PATCH v3] Add sync to ensure flash_write_cmd is fully finished
Some CPUs like PPC, BLACKFIN need sync() to ensure cfi flash write command
is fully finished. The sync() is defined in each CPU's io.h file. For
those CPUs which do not need sync for now, a dummy sync() is defined in
their io.h as well.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Diffstat (limited to 'include/asm-nios2')
-rw-r--r-- | include/asm-nios2/io.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-nios2/io.h b/include/asm-nios2/io.h index 0fab53b..5bb5322 100644 --- a/include/asm-nios2/io.h +++ b/include/asm-nios2/io.h @@ -24,7 +24,10 @@ #ifndef __ASM_NIOS2_IO_H_ #define __ASM_NIOS2_IO_H_ -#define sync() asm volatile ("sync" : : : "memory"); +static inline void sync(void) +{ + __asm__ __volatile__ ("sync" : : : "memory"); +} extern unsigned char inb (unsigned char *port); extern unsigned short inw (unsigned short *port); |