X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstr7x.c;h=015202a0e98a0660ed53b5fab913a26a60a0819e;hb=e537e807f6e634eb921988ad5db353cdcf03ee50;hp=32c8ebd5e034880a5f9e7cca3cddd95834a2fe23;hpb=32c4c18045599ddfed36f52b276166ce932b1bf7;p=openocd.git diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c index 32c8ebd5e0..015202a0e9 100644 --- a/src/flash/nor/str7x.c +++ b/src/flash/nor/str7x.c @@ -19,9 +19,7 @@ * GNU General Public License for more details. * * * * 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., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -442,7 +440,7 @@ static int str7x_protect(struct flash_bank *bank, int set, int first, int last) return ERROR_OK; } -static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, +static int str7x_write_block(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { struct str7x_flash_bank *str7x_info = bank->driver_priv; @@ -487,7 +485,7 @@ static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, if (target_alloc_working_area_try(target, sizeof(str7x_flash_write_code), &write_algorithm) != ERROR_OK) { return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; - }; + } uint8_t code[sizeof(str7x_flash_write_code)]; target_buffer_set_u32_array(target, code, ARRAY_SIZE(str7x_flash_write_code), @@ -559,7 +557,7 @@ static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, return retval; } -static int str7x_write(struct flash_bank *bank, uint8_t *buffer, +static int str7x_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { struct target *target = bank->target; @@ -814,4 +812,5 @@ struct flash_driver str7x_flash = { .erase_check = default_flash_blank_check, .protect_check = str7x_protect_check, .info = get_str7x_info, + .free_driver_priv = default_flash_free_driver_priv, };