X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstr9xpec.c;h=e08495da05494b012fda61836b1178d33a2d111a;hb=9b2cc2f72f0774e9558006a267de524dfe79ec88;hp=e89ecf49f0838f86a5c5cfa7e00bef8a4adf77e7;hpb=9f0cba528a163645c8ecace413731c23310f2c26;p=openocd.git diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c index e89ecf49f0..e08495da05 100644 --- a/src/flash/nor/str9xpec.c +++ b/src/flash/nor/str9xpec.c @@ -18,7 +18,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -199,7 +199,6 @@ static int str9xpec_read_config(struct flash_bank *bank) field.out_value = NULL; field.in_value = str9xpec_info->options; - jtag_add_dr_scan(tap, 1, &field, TAP_IDLE); jtag_execute_queue(); @@ -761,12 +760,6 @@ static int str9xpec_erase_check(struct flash_bank *bank) return str9xpec_blank_check(bank, 0, bank->num_sectors - 1); } -static int get_str9xpec_info(struct flash_bank *bank, char *buf, int buf_size) -{ - snprintf(buf, buf_size, "str9xpec flash driver info"); - return ERROR_OK; -} - COMMAND_HANDLER(str9xpec_handle_flash_options_read_command) { uint8_t status; @@ -1050,20 +1043,24 @@ COMMAND_HANDLER(str9xpec_handle_flash_enable_turbo_command) str9xpec_info = bank->driver_priv; - tap0 = str9xpec_info->tap; - /* remove arm core from chain - enter turbo mode */ + tap0 = str9xpec_info->tap; + if (tap0 == NULL) { + /* things are *WRONG* */ + command_print(CMD_CTX, "**STR9FLASH** (tap0) invalid chain?"); + return ERROR_FAIL; + } tap1 = tap0->next_tap; if (tap1 == NULL) { /* things are *WRONG* */ command_print(CMD_CTX, "**STR9FLASH** (tap1) invalid chain?"); - return ERROR_OK; + return ERROR_FAIL; } tap2 = tap1->next_tap; if (tap2 == NULL) { /* things are *WRONG* */ command_print(CMD_CTX, "**STR9FLASH** (tap2) invalid chain?"); - return ERROR_OK; + return ERROR_FAIL; } /* enable turbo mode - TURBO-PROG-ENABLE */ @@ -1212,5 +1209,4 @@ struct flash_driver str9xpec_flash = { .auto_probe = str9xpec_probe, .erase_check = str9xpec_erase_check, .protect_check = str9xpec_protect_check, - .info = get_str9xpec_info, };