summaryrefslogtreecommitdiff
path: root/board/bf533-ezkit
diff options
context:
space:
mode:
authorAubrey Li <aubrey.adi@gmail.com>2007-03-12 00:25:14 +0800
committerAubrey Li <aubrey.adi@gmail.com>2007-03-12 00:25:14 +0800
commit8440bb14581a294375c34b91b42512f9753d1130 (patch)
tree2af94c8cdb0bedf0501affd4db35d6c6faee317c /board/bf533-ezkit
parent8db13d63157811c839d15a313d9f2d2f5fd10af3 (diff)
[Blackfin][PATCH] code cleanup
Diffstat (limited to 'board/bf533-ezkit')
-rw-r--r--board/bf533-ezkit/flash.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/board/bf533-ezkit/flash.c b/board/bf533-ezkit/flash.c
index 1b56d5bc6a6..067a2609065 100644
--- a/board/bf533-ezkit/flash.c
+++ b/board/bf533-ezkit/flash.c
@@ -26,6 +26,7 @@
* MA 02111-1307 USA
*/
+#include <asm/io.h>
#include "flash-defines.h"
void flash_reset(void)
@@ -282,9 +283,9 @@ int write_flash(long nOffset, int nValue)
long addr;
addr = (CFG_FLASH_BASE + nOffset);
- __builtin_bfin_ssync();
+ sync();
*(unsigned volatile short *)addr = nValue;
- __builtin_bfin_ssync();
+ sync();
if (poll_toggle_bit(nOffset) < 0)
return FLASH_FAIL;
return FLASH_SUCCESS;
@@ -297,9 +298,9 @@ int read_flash(long nOffset, int *pnValue)
if (nOffset != 0x2)
reset_flash();
- __builtin_bfin_ssync();
+ sync();
nValue = *(volatile unsigned short *)addr;
- __builtin_bfin_ssync();
+ sync();
*pnValue = nValue;
return TRUE;
}