From 0160320060cab521f66ea100d67a31b0b906d35f Mon Sep 17 00:00:00 2001 From: ntfreak Date: Wed, 9 Jan 2008 15:58:01 +0000 Subject: - rename flash_init and flash_erase to flash_init_drivers and flash_erase_address_range - stops conflicts with redboot. Thanks Øyvind Harboe - gdb connection not dropped if we fail to allocate memory in query packets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.berlios.de/openocd/trunk@249 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/flash.c | 8 ++++---- src/flash/flash.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/flash') diff --git a/src/flash/flash.c b/src/flash/flash.c index de42fcde..7336bbd7 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -90,7 +90,7 @@ int flash_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -int flash_init(struct command_context_s *cmd_ctx) +int flash_init_drivers(struct command_context_s *cmd_ctx) { if (flash_banks) { @@ -398,7 +398,7 @@ int handle_flash_erase_address_command(struct command_context_s *cmd_ctx, char * duration_start_measure(&duration); - if ((retval = flash_erase(target, address, length)) != ERROR_OK) + if ((retval = flash_erase_address_range(target, address, length)) != ERROR_OK) { switch (retval) { @@ -801,7 +801,7 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr) } /* erase given flash region, selects proper bank according to target and address */ -int flash_erase(target_t *target, u32 addr, u32 length) +int flash_erase_address_range(target_t *target, u32 addr, u32 length) { flash_bank_t *c; int first = -1; @@ -977,7 +977,7 @@ int flash_write(target_t *target, image_t *image, u32 *written, char **error_str if (erase) { /* calculate and erase sectors */ - retval = flash_erase( target, run_address, run_size ); + retval = flash_erase_address_range( target, run_address, run_size ); } if (retval == ERROR_OK) diff --git a/src/flash/flash.h b/src/flash/flash.h index 0f616a9a..a0529aa4 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -64,9 +64,9 @@ typedef struct flash_bank_s } flash_bank_t; extern int flash_register_commands(struct command_context_s *cmd_ctx); -extern int flash_init(struct command_context_s *cmd_ctx); +extern int flash_init_drivers(struct command_context_s *cmd_ctx); -extern int flash_erase(target_t *target, u32 addr, u32 length); +extern int flash_erase_address_range(target_t *target, u32 addr, u32 length); extern int flash_write(target_t *target, image_t *image, u32 *written, char **error, int *failed, int erase); extern void flash_set_dirty(void); -- cgit v1.2.3