flash/fespi: Use COMMAND_PARSE_ADDRESS 00/5100/2
authorTim Newsome <tim@sifive.com>
Mon, 8 Apr 2019 21:06:04 +0000 (14:06 -0700)
committerTomas Vanek <vanekt@fbl.cz>
Wed, 24 Apr 2019 20:11:18 +0000 (21:11 +0100)
Signed-off-by: Tim Newsome <tim@sifive.com>
Change-Id: If4d22fe1440f926271274820f96428718a127ac2
Reviewed-on: http://openocd.zylin.com/5100
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/fespi.c

index 1c343a8..5d8f810 100644 (file)
@@ -159,9 +159,7 @@ FLASH_BANK_COMMAND_HANDLER(fespi_flash_bank_command)
        fespi_info->probed = 0;
        fespi_info->ctrl_base = 0;
        if (CMD_ARGC >= 7) {
-               int temp;
-               COMMAND_PARSE_NUMBER(int, CMD_ARGV[6], temp);
-               fespi_info->ctrl_base = (uint32_t) temp;
+               COMMAND_PARSE_ADDRESS(CMD_ARGV[6], fespi_info->ctrl_base);
                LOG_DEBUG("ASSUMING FESPI device at ctrl_base = " TARGET_ADDR_FMT,
                                fespi_info->ctrl_base);
        }