diff options
author | Wolfgang Denk <wd@denx.de> | 2011-12-09 12:14:31 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-12-10 23:12:40 +0100 |
commit | f23b7ea0e6852c898934582db5dbf2d0f22c69cd (patch) | |
tree | 4441d3e4c31d7d0f5672358278b25f7f0d50cfc5 /board | |
parent | c81f9cdd2201a6fb770a82879e471b96370e18e1 (diff) | |
download | u-boot-imx-f23b7ea0e6852c898934582db5dbf2d0f22c69cd.zip u-boot-imx-f23b7ea0e6852c898934582db5dbf2d0f22c69cd.tar.gz u-boot-imx-f23b7ea0e6852c898934582db5dbf2d0f22c69cd.tar.bz2 |
board/ti/omap730p2/flash.c: Fix GCC 4.6 build warnings
Fix:
flash.c: In function 'flash_get_offsets':
flash.c:122:10: warning: variable 'pOrgDef' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'flash_erase':
flash.c:263:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:439:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Dave Peverley <dpeverley@mpc-data.co.uk>
Acked-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/omap730p2/flash.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/board/ti/omap730p2/flash.c b/board/ti/omap730p2/flash.c index 185bc2d..a292627 100644 --- a/board/ti/omap730p2/flash.c +++ b/board/ti/omap730p2/flash.c @@ -119,9 +119,7 @@ unsigned long flash_init (void) static void flash_get_offsets (ulong base, flash_info_t * info) { int i; - OrgDef *pOrgDef; - pOrgDef = OrgIntel_28F256L18T; if (info->flash_id == FLASH_UNKNOWN) { return; } @@ -335,6 +333,10 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) printf (" done\n"); } } + + if (flag) + enable_interrupts(); + return rcode; } @@ -436,7 +438,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW data) { FPWV *addr = (FPWV *) dest; ulong status; - int flag; + int flag, rc = 0; ulong start; /* Check if Flash is (sufficiently) erased */ @@ -456,12 +458,15 @@ static int write_data (flash_info_t * info, ulong dest, FPW data) /* wait while polling the status register */ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) { if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { - *addr = (FPW) 0x00FF00FF; /* restore read mode */ - return (1); + rc = 1; + goto done; } } - *addr = (FPW) 0x00FF00FF; /* restore read mode */ - return (0); +done: + *addr = (FPW)0x00FF00FF; /* restore read mode */ + if (flag) + enable_interrupts(); + return rc; } void inline spin_wheel (void) |