Skip to content
Snippets Groups Projects
Commit 6859ea74 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Heiko Schocher
Browse files

board/mx1ads/syncflash.c: Fix GCC 4.6 warnings


Fix:
syncflash.c: In function 'SF_SR':
syncflash.c:60:10: warning: variable 'tmp1' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'SF_PrechargeAll':
syncflash.c:96:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
mx1ads.c: In function 'board_early_init_f':
mx1ads.c:83:24: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'SF_Erase':
syncflash.c:112:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'flash_init':
syncflash.c:155:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 90729c02
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips ...@@ -57,7 +57,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips
/* Get Status register */ /* Get Status register */
u32 SF_SR(void) { u32 SF_SR(void) {
u32 tmp,tmp1; u32 tmp;
reg_SFCTL = CMD_PROGRAM; reg_SFCTL = CMD_PROGRAM;
tmp = __REG(CONFIG_SYS_FLASH_BASE); tmp = __REG(CONFIG_SYS_FLASH_BASE);
...@@ -65,7 +65,7 @@ u32 SF_SR(void) { ...@@ -65,7 +65,7 @@ u32 SF_SR(void) {
reg_SFCTL = CMD_NORMAL; reg_SFCTL = CMD_NORMAL;
reg_SFCTL = CMD_LCR; /* Activate LCR Mode */ reg_SFCTL = CMD_LCR; /* Activate LCR Mode */
tmp1 = __REG(CONFIG_SYS_FLASH_BASE + LCR_SR_CLEAR); __REG(CONFIG_SYS_FLASH_BASE + LCR_SR_CLEAR);
return tmp; return tmp;
} }
...@@ -93,10 +93,10 @@ u8 SF_Ready(void) { ...@@ -93,10 +93,10 @@ u8 SF_Ready(void) {
/* Issue the precharge all command */ /* Issue the precharge all command */
void SF_PrechargeAll(void) { void SF_PrechargeAll(void) {
u32 tmp; /* Set Precharge Command */
reg_SFCTL = CMD_PREC;
reg_SFCTL = CMD_PREC; /* Set Precharge Command */ /* Issue Precharge All Command */
tmp = __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10); /* Issue Precharge All Command */ __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10);
} }
/* set SyncFlash to normal mode */ /* set SyncFlash to normal mode */
...@@ -109,13 +109,12 @@ void SF_Normal(void) { ...@@ -109,13 +109,12 @@ void SF_Normal(void) {
/* Erase SyncFlash */ /* Erase SyncFlash */
void SF_Erase(u32 RowAddress) { void SF_Erase(u32 RowAddress) {
u32 tmp;
reg_SFCTL = CMD_NORMAL; reg_SFCTL = CMD_NORMAL;
tmp = __REG(RowAddress); __REG(RowAddress);
reg_SFCTL = CMD_PREC; reg_SFCTL = CMD_PREC;
tmp = __REG(RowAddress); __REG(RowAddress);
reg_SFCTL = CMD_LCR; /* Set LCR mode */ reg_SFCTL = CMD_LCR; /* Set LCR mode */
__REG(RowAddress + LCR_ERASE_CONFIRM) = 0; /* Issue Erase Setup Command */ __REG(RowAddress + LCR_ERASE_CONFIRM) = 0; /* Issue Erase Setup Command */
...@@ -152,7 +151,6 @@ void SF_NvmodeWrite(void) { ...@@ -152,7 +151,6 @@ void SF_NvmodeWrite(void) {
ulong flash_init(void) { ulong flash_init(void) {
int i, j; int i, j;
u32 tmp;
/* Turn on CSD1 for negating RESETSF of SyncFLash */ /* Turn on CSD1 for negating RESETSF of SyncFLash */
...@@ -160,7 +158,7 @@ ulong flash_init(void) { ...@@ -160,7 +158,7 @@ ulong flash_init(void) {
udelay(200); udelay(200);
reg_SFCTL = CMD_LMR; /* Set Load Mode Register Command */ reg_SFCTL = CMD_LMR; /* Set Load Mode Register Command */
tmp = __REG(MODE_REG_VAL); /* Issue Load Mode Register Command */ __REG(MODE_REG_VAL); /* Issue Load Mode Register Command */
SF_Normal(); SF_Normal();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment