]> git.sur5r.net Git - openocd/commitdiff
NOR/CFI: remove redundant code
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 14 Apr 2010 08:51:16 +0000 (16:51 +0800)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 15 Apr 2010 17:19:54 +0000 (19:19 +0200)
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>
src/flash/nor/cfi.c

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