NOR/CFI: remove redundant code

Arguments for "flash bank" command are already
parsed and put in "bank" struct.
Removed code to parse them again.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
__archive__
Antonio Borneo 2010-04-14 16:51:16 +08:00 committed by Øyvind Harboe
parent c9e58238c3
commit b886049c74
1 changed files with 2 additions and 6 deletions

View File

@ -598,12 +598,8 @@ FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
return ERROR_FLASH_BANK_INVALID; return ERROR_FLASH_BANK_INVALID;
} }
uint16_t chip_width, bus_width; if ((bank->chip_width > CFI_MAX_CHIP_WIDTH)
COMMAND_PARSE_NUMBER(u16, CMD_ARGV[3], chip_width); || (bank->bus_width > CFI_MAX_BUS_WIDTH))
COMMAND_PARSE_NUMBER(u16, CMD_ARGV[4], bus_width);
if ((chip_width > CFI_MAX_CHIP_WIDTH)
|| (bus_width > CFI_MAX_BUS_WIDTH))
{ {
LOG_ERROR("chip and bus width have to specified in bytes"); LOG_ERROR("chip and bus width have to specified in bytes");
return ERROR_FLASH_BANK_INVALID; return ERROR_FLASH_BANK_INVALID;