summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2010-04-14 16:51:16 +0800
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-04-15 19:19:54 +0200
commitb886049c74de147b1ce6f7f0173ecd71323c5c64 (patch)
treede5800d90e9ddd1cefa648342ff369c398e60a5e
parentc9e58238c3b1ae181a7d54bc5255ef98771493c2 (diff)
downloadopenocd_libswd-b886049c74de147b1ce6f7f0173ecd71323c5c64.tar.gz
openocd_libswd-b886049c74de147b1ce6f7f0173ecd71323c5c64.tar.bz2
openocd_libswd-b886049c74de147b1ce6f7f0173ecd71323c5c64.tar.xz
openocd_libswd-b886049c74de147b1ce6f7f0173ecd71323c5c64.zip
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>
-rw-r--r--src/flash/nor/cfi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index 325dce90..a64d78f5 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -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;