openocd/src/flash/nor
Andreas Fritiofson 9a8edbfa8b flash: reduce code duplication in stm32 flash probe
Remove a lot of the repetitive code in stm32f1x flash probe by converting
the large if-selector to a switch, moving the common checks outside it and
concentrating the failure handling to a single point.

Do the same with stm32f2x and stm32lx for consistency.

Change-Id: Ic0ecfb1533c49f5d2108cda5fd20c8372d7c71ef
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/746
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-07-30 06:33:58 +00:00
..
aduc702x.c build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
at91sam3.c topic: flash: description/id added for ATSAM3SD8C 2012-06-26 18:53:02 +00:00
at91sam4.c Changed SAM4S Erase for effective Sector erase 2012-06-26 13:51:59 +00:00
at91sam7.c AT91SAM7 Flash: fixed redundant assignation warning 2012-06-26 07:53:22 +00:00
avrf.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
cfi.c cfi: fix write_bank segfault with spansion flash on armv7m 2012-05-14 09:30:18 +00:00
cfi.h build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
core.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
core.h flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
driver.h flash/nor/driver.h: typo fix 2012-05-21 08:49:15 +00:00
drivers.c topic: Added support for the SAM4S variants 2012-04-26 10:58:14 +00:00
dsp5680xx_flash.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
em357.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
faux.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
fm3.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
imp.h build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
kinetis.c kinetis: update support for all program flash granularities 2012-06-26 11:53:37 +00:00
lpc288x.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
lpc2000.c build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
lpc2900.c build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
Makefile.am topic: Added support for the SAM4S variants 2012-04-26 10:58:14 +00:00
non_cfi.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
non_cfi.h build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
ocl.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
ocl.h build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
pic32mx.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
stellaris.c flash: blank check use default_flash_blank_check 2012-05-14 09:38:26 +00:00
stm32f1x.c flash: reduce code duplication in stm32 flash probe 2012-07-30 06:33:58 +00:00
stm32f2x.c flash: reduce code duplication in stm32 flash probe 2012-07-30 06:33:58 +00:00
stm32lx.c flash: reduce code duplication in stm32 flash probe 2012-07-30 06:33:58 +00:00
stmsmi.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
str7x.c build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
str9x.c build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
str9xpec.c flash: Additional check for NULL in str9xpec enable_turbo 2012-03-06 13:32:48 +00:00
tcl.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
tms470.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00
virtual.c build: cleanup src/flash/nor directory 2012-02-06 10:54:14 +00:00