diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-10 01:41:30 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 10:51:46 -0800 |
commit | 0796dfff89bf00f82a780d7719767bcffe881d67 (patch) | |
tree | 92376ad27aee3b251bcb87ca4e388290c9e00529 /src/flash | |
parent | 57c5c5f46304a785092874a7dc0f6abc84794cc3 (diff) | |
download | riscv-openocd-0796dfff89bf00f82a780d7719767bcffe881d67.zip riscv-openocd-0796dfff89bf00f82a780d7719767bcffe881d67.tar.gz riscv-openocd-0796dfff89bf00f82a780d7719767bcffe881d67.tar.bz2 |
use FLASH_BANK_COMMAND_HANDLER macro
Defines all flash_bank_command handlers using the new macro.
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/aduc702x.c | 2 | ||||
-rw-r--r-- | src/flash/at91sam3.c | 7 | ||||
-rw-r--r-- | src/flash/at91sam7.c | 2 | ||||
-rw-r--r-- | src/flash/avrf.c | 2 | ||||
-rw-r--r-- | src/flash/cfi.c | 2 | ||||
-rw-r--r-- | src/flash/ecos.c | 2 | ||||
-rw-r--r-- | src/flash/faux.c | 2 | ||||
-rw-r--r-- | src/flash/lpc2000.c | 2 | ||||
-rw-r--r-- | src/flash/lpc288x.c | 2 | ||||
-rw-r--r-- | src/flash/lpc2900.c | 4 | ||||
-rw-r--r-- | src/flash/ocl.c | 2 | ||||
-rw-r--r-- | src/flash/pic32mx.c | 2 | ||||
-rw-r--r-- | src/flash/stellaris.c | 2 | ||||
-rw-r--r-- | src/flash/stm32x.c | 2 | ||||
-rw-r--r-- | src/flash/str7x.c | 2 | ||||
-rw-r--r-- | src/flash/str9x.c | 3 | ||||
-rw-r--r-- | src/flash/str9xpec.c | 2 | ||||
-rw-r--r-- | src/flash/tms470.c | 2 |
18 files changed, 18 insertions, 26 deletions
diff --git a/src/flash/aduc702x.c b/src/flash/aduc702x.c index 7d6fa24..0e862e9 100644 --- a/src/flash/aduc702x.c +++ b/src/flash/aduc702x.c @@ -61,7 +61,7 @@ typedef struct /* flash bank aduc702x 0 0 0 0 <target#> * The ADC7019-28 devices all have the same flash layout */ -static int aduc702x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(aduc702x_flash_bank_command) { aduc702x_flash_bank_t *nbank; diff --git a/src/flash/at91sam3.c b/src/flash/at91sam3.c index 804a35b..7e6b456 100644 --- a/src/flash/at91sam3.c +++ b/src/flash/at91sam3.c @@ -1641,12 +1641,7 @@ sam3_protect_check(struct flash_bank_s *bank) return ERROR_OK; } -static int -sam3_flash_bank_command(struct command_context_s *cmd_ctx, - char *cmd, - char **args, - int argc, - struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(sam3_flash_bank_command) { struct sam3_chip *pChip; diff --git a/src/flash/at91sam7.c b/src/flash/at91sam7.c index 4cd2705..266be06 100644 --- a/src/flash/at91sam7.c +++ b/src/flash/at91sam7.c @@ -711,7 +711,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank) return ERROR_OK; } -static int at91sam7_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command) { flash_bank_t *t_bank = bank; at91sam7_flash_bank_t *at91sam7_info; diff --git a/src/flash/avrf.c b/src/flash/avrf.c index 6badb2d..35d31fb 100644 --- a/src/flash/avrf.c +++ b/src/flash/avrf.c @@ -180,7 +180,7 @@ static int avr_jtagprg_writeflashpage(avr_common_t *avr, uint8_t *page_buf, uint return ERROR_OK; } -static int avrf_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(avrf_flash_bank_command) { avrf_flash_bank_t *avrf_info; diff --git a/src/flash/cfi.c b/src/flash/cfi.c index b448a30..08c4358 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -601,7 +601,7 @@ static int cfi_register_commands(struct command_context_s *cmd_ctx) /* flash_bank cfi <base> <size> <chip_width> <bus_width> <target#> [options] */ -static int cfi_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command) { cfi_flash_bank_t *cfi_info; int i; diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 401fdf2..2c3190a 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -104,7 +104,7 @@ flash_errmsg(int err) /* flash bank ecosflash <base> <size> <chip_width> <bus_width> <target#> <driverPath> */ -static int ecosflash_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(ecosflash_flash_bank_command) { ecosflash_flash_bank_t *info; diff --git a/src/flash/faux.c b/src/flash/faux.c index 474dee5..b997b87 100644 --- a/src/flash/faux.c +++ b/src/flash/faux.c @@ -37,7 +37,7 @@ static const int sectorSize = 0x10000; /* flash bank faux <base> <size> <chip_width> <bus_width> <target#> <driverPath> */ -static int faux_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(faux_flash_bank_command) { faux_flash_bank_t *info; diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c index 4d4d9a2..0481355 100644 --- a/src/flash/lpc2000.c +++ b/src/flash/lpc2000.c @@ -419,7 +419,7 @@ static int lpc2000_iap_blank_check(struct flash_bank_s *bank, int first, int las /* * flash bank lpc2000 <base> <size> 0 0 <target#> <lpc_variant> <cclk> [calc_checksum] */ -static int lpc2000_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(lpc2000_flash_bank_command) { lpc2000_flash_bank_t *lpc2000_info; diff --git a/src/flash/lpc288x.c b/src/flash/lpc288x.c index 36444fb..3c3e1e4 100644 --- a/src/flash/lpc288x.c +++ b/src/flash/lpc288x.c @@ -165,7 +165,7 @@ static int lpc288x_protect_check(struct flash_bank_s *bank) } /* flash_bank LPC288x 0 0 0 0 <target#> <cclk> */ -static int lpc288x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(lpc288x_flash_bank_command) { lpc288x_flash_bank_t *lpc288x_info; diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c index 945fc9a..953a62a 100644 --- a/src/flash/lpc2900.c +++ b/src/flash/lpc2900.c @@ -1016,9 +1016,7 @@ static int lpc2900_register_commands(struct command_context_s *cmd_ctx) /// Evaluate flash bank command. -static int lpc2900_flash_bank_command(struct command_context_s *cmd_ctx, - char *cmd, char **args, int argc, - struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(lpc2900_flash_bank_command) { lpc2900_flash_bank_t *lpc2900_info; diff --git a/src/flash/ocl.c b/src/flash/ocl.c index 51ccc96..63e9282 100644 --- a/src/flash/ocl.c +++ b/src/flash/ocl.c @@ -44,7 +44,7 @@ static int ocl_protect_check(struct flash_bank_s *bank) } /* flash_bank ocl 0 0 0 0 <target#> */ -static int ocl_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(ocl_flash_bank_command) { int retval; armv4_5_common_t *armv4_5; diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c index aa34aea..1408fe9 100644 --- a/src/flash/pic32mx.c +++ b/src/flash/pic32mx.c @@ -62,7 +62,7 @@ static int pic32mx_write_word(struct flash_bank_s *bank, uint32_t address, uint3 /* flash bank pic32mx <base> <size> 0 0 <target#> */ -static int pic32mx_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(pic32mx_flash_bank_command) { pic32mx_flash_bank_t *pic32mx_info; diff --git a/src/flash/stellaris.c b/src/flash/stellaris.c index 22d5bc4..d66b9a8 100644 --- a/src/flash/stellaris.c +++ b/src/flash/stellaris.c @@ -213,7 +213,7 @@ static char * StellarisClassname[5] = /* flash_bank stellaris <base> <size> 0 0 <target#> */ -static int stellaris_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(stellaris_flash_bank_command) { stellaris_flash_bank_t *stellaris_info; diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index 95d15a9..41b9008 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -33,7 +33,7 @@ static int stm32x_mass_erase(struct flash_bank_s *bank); /* flash bank stm32x <base> <size> 0 0 <target#> */ -static int stm32x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(stm32x_flash_bank_command) { stm32x_flash_bank_t *stm32x_info; diff --git a/src/flash/str7x.c b/src/flash/str7x.c index 028eab6..9738180 100644 --- a/src/flash/str7x.c +++ b/src/flash/str7x.c @@ -109,7 +109,7 @@ static int str7x_build_block_list(struct flash_bank_s *bank) /* flash bank str7x <base> <size> 0 0 <target#> <str71_variant> */ -static int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(str7x_flash_bank_command) { str7x_flash_bank_t *str7x_info; diff --git a/src/flash/str9x.c b/src/flash/str9x.c index 665c160..cdee571 100644 --- a/src/flash/str9x.c +++ b/src/flash/str9x.c @@ -116,8 +116,7 @@ static int str9x_build_block_list(struct flash_bank_s *bank) /* flash bank str9x <base> <size> 0 0 <target#> */ -static int str9x_flash_bank_command(struct command_context_s *cmd_ctx, - char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(str9x_flash_bank_command) { str9x_flash_bank_t *str9x_info; diff --git a/src/flash/str9xpec.c b/src/flash/str9xpec.c index 3a35ee1..4056ba7 100644 --- a/src/flash/str9xpec.c +++ b/src/flash/str9xpec.c @@ -235,7 +235,7 @@ static int str9xpec_build_block_list(struct flash_bank_s *bank) /* flash bank str9x <base> <size> 0 0 <target#> */ -static int str9xpec_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(str9xpec_flash_bank_command) { str9xpec_flash_controller_t *str9xpec_info; armv4_5_common_t *armv4_5 = NULL; diff --git a/src/flash/tms470.c b/src/flash/tms470.c index 53043cd..d33ccd6 100644 --- a/src/flash/tms470.c +++ b/src/flash/tms470.c @@ -1222,7 +1222,7 @@ static int tms470_info(struct flash_bank_s *bank, char *buf, int buf_size) * [options...] */ -static int tms470_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(tms470_flash_bank_command) { bank->driver_priv = malloc(sizeof(tms470_flash_bank_t)); |