/* Get Status register */
u32 SF_SR(void) {
- u32 tmp,tmp1;
+ u32 tmp;
reg_SFCTL = CMD_PROGRAM;
tmp = __REG(CONFIG_SYS_FLASH_BASE);
reg_SFCTL = CMD_NORMAL;
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;
}
/* Issue the precharge all command */
void SF_PrechargeAll(void) {
- u32 tmp;
-
- reg_SFCTL = CMD_PREC; /* Set Precharge Command */
- tmp = __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10); /* Issue Precharge All Command */
+ /* Set Precharge Command */
+ reg_SFCTL = CMD_PREC;
+ /* Issue Precharge All Command */
+ __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10);
}
/* set SyncFlash to normal mode */
/* Erase SyncFlash */
void SF_Erase(u32 RowAddress) {
- u32 tmp;
reg_SFCTL = CMD_NORMAL;
- tmp = __REG(RowAddress);
+ __REG(RowAddress);
reg_SFCTL = CMD_PREC;
- tmp = __REG(RowAddress);
+ __REG(RowAddress);
reg_SFCTL = CMD_LCR; /* Set LCR mode */
__REG(RowAddress + LCR_ERASE_CONFIRM) = 0; /* Issue Erase Setup Command */
ulong flash_init(void) {
int i, j;
- u32 tmp;
/* Turn on CSD1 for negating RESETSF of SyncFLash */
udelay(200);
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();