Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
openocd
Commits
cfc4d5c6
Commit
cfc4d5c6
authored
Nov 09, 2009
by
Zachary T Welch
Browse files
use COMMAND_HANDLER macro to define all commands
parent
ddb6138e
Changes
55
Hide whitespace changes
Inline
Side-by-side
src/flash/at91sam3.c
View file @
cfc4d5c6
...
...
@@ -2266,8 +2266,7 @@ sam3_write(struct flash_bank_s *bank,
return
r
;
}
static
int
sam3_handle_info_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
sam3_handle_info_command
)
{
struct
sam3_chip
*
pChip
;
void
*
vp
;
...
...
@@ -2343,8 +2342,7 @@ sam3_handle_info_command(struct command_context_s *cmd_ctx, char *cmd, char **ar
return
ERROR_OK
;
}
static
int
sam3_handle_gpnvm_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
sam3_handle_gpnvm_command
)
{
unsigned
x
,
v
;
int
r
,
who
;
...
...
@@ -2437,8 +2435,7 @@ sam3_handle_gpnvm_command(struct command_context_s *cmd_ctx, char *cmd, char **a
return
r
;
}
static
int
sam3_handle_slowclk_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
sam3_handle_slowclk_command
)
{
struct
sam3_chip
*
pChip
;
...
...
src/flash/at91sam7.c
View file @
cfc4d5c6
...
...
@@ -1098,7 +1098,7 @@ static int at91sam7_info(struct flash_bank_s *bank, char *buf, int buf_size)
* The maximum number of write/erase cycles for Non volatile Memory bits is 100. this includes
* Lock Bits (LOCKx), General Purpose NVM bits (GPNVMx) and the Security Bit.
*/
static
int
at91sam7_handle_gpnvm_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
at91sam7_handle_gpnvm_command
)
{
flash_bank_t
*
bank
;
int
bit
;
...
...
src/flash/avrf.c
View file @
cfc4d5c6
...
...
@@ -415,7 +415,7 @@ static int avrf_mass_erase(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
avrf_handle_mass_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
avrf_handle_mass_erase_command
)
{
int
i
;
...
...
src/flash/flash.c
View file @
cfc4d5c6
...
...
@@ -215,7 +215,7 @@ int flash_command_get_bank_by_num(
}
static
int
handle_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_bank_command
)
{
int
retval
;
int
i
;
...
...
@@ -295,7 +295,7 @@ static int handle_flash_bank_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
static
int
handle_flash_info_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_info_command
)
{
flash_bank_t
*
p
;
uint32_t
i
=
0
;
...
...
@@ -357,7 +357,7 @@ static int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
static
int
handle_flash_probe_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_probe_command
)
{
int
retval
;
...
...
@@ -394,7 +394,7 @@ static int handle_flash_probe_command(struct command_context_s *cmd_ctx, char *c
return
ERROR_OK
;
}
static
int
handle_flash_erase_check_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_erase_check_command
)
{
if
(
argc
!=
1
)
{
...
...
@@ -440,7 +440,7 @@ static int handle_flash_erase_check_command(struct command_context_s *cmd_ctx, c
return
ERROR_OK
;
}
static
int
handle_flash_erase_address_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_erase_address_command
)
{
flash_bank_t
*
p
;
int
retval
;
...
...
@@ -484,7 +484,7 @@ static int handle_flash_erase_address_command(struct command_context_s *cmd_ctx,
return
retval
;
}
static
int
handle_flash_protect_check_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_protect_check_command
)
{
if
(
argc
!=
1
)
return
ERROR_COMMAND_SYNTAX_ERROR
;
...
...
@@ -528,8 +528,7 @@ static int flash_check_sector_parameters(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
handle_flash_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_erase_command
)
{
if
(
argc
!=
2
)
return
ERROR_COMMAND_SYNTAX_ERROR
;
...
...
@@ -569,8 +568,7 @@ static int handle_flash_erase_command(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
handle_flash_protect_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_protect_command
)
{
if
(
argc
!=
3
)
return
ERROR_COMMAND_SYNTAX_ERROR
;
...
...
@@ -614,7 +612,7 @@ static int handle_flash_protect_command(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
handle_flash_write_image_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_write_image_command
)
{
target_t
*
target
=
get_current_target
(
cmd_ctx
);
...
...
@@ -704,7 +702,7 @@ static int handle_flash_write_image_command(struct command_context_s *cmd_ctx, c
return
retval
;
}
static
int
handle_flash_fill_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_fill_command
)
{
int
err
=
ERROR_OK
;
uint32_t
address
;
...
...
@@ -808,7 +806,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
static
int
handle_flash_write_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_flash_write_bank_command
)
{
uint32_t
offset
;
uint8_t
*
buffer
;
...
...
src/flash/lpc2000.c
View file @
cfc4d5c6
...
...
@@ -737,7 +737,7 @@ static int lpc2000_info(struct flash_bank_s *bank, char *buf, int buf_size)
return
ERROR_OK
;
}
static
int
lpc2000_handle_part_id_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2000_handle_part_id_command
)
{
uint32_t
param_table
[
5
];
uint32_t
result_table
[
4
];
...
...
src/flash/lpc2900.c
View file @
cfc4d5c6
...
...
@@ -531,8 +531,7 @@ static uint32_t lpc2900_calc_tr( uint32_t clock, uint32_t time )
* Uses the Built-In-Self-Test (BIST) to generate a 128-bit hash value
* of the flash content.
*/
static
int
lpc2900_handle_signature_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_signature_command
)
{
uint32_t
status
;
uint32_t
signature
[
4
];
...
...
@@ -582,8 +581,7 @@ static int lpc2900_handle_signature_command( struct command_context_s *cmd_ctx,
* Read customer info from index sector, and store that block of data into
* a disk file. The format is binary.
*/
static
int
lpc2900_handle_read_custom_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_read_custom_command
)
{
if
(
argc
<
2
)
{
...
...
@@ -654,8 +652,7 @@ static int lpc2900_handle_read_custom_command( struct command_context_s *cmd_ctx
/**
* Enter password to enable potentially dangerous options.
*/
static
int
lpc2900_handle_password_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_password_command
)
{
if
(
argc
<
2
)
{
...
...
@@ -690,8 +687,7 @@ static int lpc2900_handle_password_command(struct command_context_s *cmd_ctx,
/**
* Write customer info from file to the index sector.
*/
static
int
lpc2900_handle_write_custom_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_write_custom_command
)
{
if
(
argc
<
2
)
{
...
...
@@ -801,8 +797,7 @@ static int lpc2900_handle_write_custom_command( struct command_context_s *cmd_ct
/**
* Activate 'sector security' for a range of sectors.
*/
static
int
lpc2900_handle_secure_sector_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_secure_sector_command
)
{
if
(
argc
<
3
)
{
...
...
@@ -901,8 +896,7 @@ static int lpc2900_handle_secure_sector_command(struct command_context_s *cmd_ct
/**
* Activate JTAG protection.
*/
static
int
lpc2900_handle_secure_jtag_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
lpc2900_handle_secure_jtag_command
)
{
if
(
argc
<
1
)
{
...
...
src/flash/lpc3180_nand_controller.c
View file @
cfc4d5c6
...
...
@@ -828,7 +828,7 @@ static int lpc3180_nand_ready(struct nand_device_s *nand, int timeout)
return
0
;
}
static
int
handle_lpc3180_select_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_lpc3180_select_command
)
{
lpc3180_nand_controller_t
*
lpc3180_info
=
NULL
;
char
*
selected
[]
=
...
...
src/flash/mflash.c
View file @
cfc4d5c6
...
...
@@ -408,7 +408,7 @@ static int mg_mflash_probe(void)
return
mg_dsk_drv_info
();
}
static
int
mg_probe_cmd
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
mg_probe_cmd
)
{
int
ret
;
...
...
@@ -702,7 +702,7 @@ static int mg_mflash_write(uint32_t addr, uint8_t *buff, uint32_t len)
return
ret
;
}
static
int
mg_write_cmd
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
mg_write_cmd
)
{
uint32_t
address
,
buf_cnt
,
cnt
,
res
,
i
;
uint8_t
*
buffer
;
...
...
@@ -766,7 +766,7 @@ mg_write_cmd_err:
return
ret
;
}
static
int
mg_dump_cmd
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
mg_dump_cmd
)
{
uint32_t
address
,
size_written
,
size
,
cnt
,
res
,
i
;
uint8_t
*
buffer
;
...
...
@@ -1208,8 +1208,7 @@ static int mg_erase_nand(void)
return
ret
;
}
int
mg_config_cmd
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
mg_config_cmd
)
{
double
fin
,
fout
;
mg_pll_t
pll
;
...
...
@@ -1281,7 +1280,7 @@ int mflash_init_drivers(struct command_context_s *cmd_ctx)
return
ERROR_OK
;
}
static
int
mg_bank_cmd
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
mg_bank_cmd
)
{
target_t
*
target
;
int
i
;
...
...
src/flash/nand.c
View file @
cfc4d5c6
...
...
@@ -205,7 +205,7 @@ static nand_ecclayout_t nand_oob_64 = {
/* nand device <nand_controller> [controller options]
*/
static
int
handle_nand_device_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_device_command
)
{
int
i
;
int
retval
;
...
...
@@ -1041,7 +1041,7 @@ int nand_write_page_raw(struct nand_device_s *nand, uint32_t page, uint8_t *data
return
ERROR_OK
;
}
int
handle_nand_list_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_list_command
)
{
nand_device_t
*
p
;
int
i
;
...
...
@@ -1068,7 +1068,7 @@ int handle_nand_list_command(struct command_context_s *cmd_ctx, char *cmd, char
return
ERROR_OK
;
}
static
int
handle_nand_info_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_info_command
)
{
int
i
=
0
;
int
j
=
0
;
...
...
@@ -1143,7 +1143,7 @@ static int handle_nand_info_command(struct command_context_s *cmd_ctx, char *cmd
return
ERROR_OK
;
}
static
int
handle_nand_probe_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_probe_command
)
{
if
(
argc
!=
1
)
{
...
...
@@ -1171,7 +1171,7 @@ static int handle_nand_probe_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
static
int
handle_nand_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_erase_command
)
{
if
(
argc
!=
1
&&
argc
!=
3
)
{
...
...
@@ -1227,7 +1227,7 @@ static int handle_nand_erase_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
int
handle_nand_check_bad_blocks_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_check_bad_blocks_command
)
{
int
first
=
-
1
;
int
last
=
-
1
;
...
...
@@ -1284,7 +1284,7 @@ int handle_nand_check_bad_blocks_command(struct command_context_s *cmd_ctx, char
return
ERROR_OK
;
}
static
int
handle_nand_write_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_write_command
)
{
uint32_t
offset
;
uint32_t
binary_size
;
...
...
@@ -1451,7 +1451,7 @@ static int handle_nand_write_command(struct command_context_s *cmd_ctx, char *cm
return
ERROR_OK
;
}
static
int
handle_nand_dump_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_dump_command
)
{
if
(
argc
<
4
)
{
...
...
@@ -1569,7 +1569,7 @@ static int handle_nand_dump_command(struct command_context_s *cmd_ctx, char *cmd
return
ERROR_OK
;
}
static
int
handle_nand_raw_access_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
handle_nand_raw_access_command
)
{
if
((
argc
<
1
)
||
(
argc
>
2
))
{
...
...
src/flash/pic32mx.c
View file @
cfc4d5c6
...
...
@@ -631,7 +631,7 @@ static int pic32mx_auto_probe(struct flash_bank_s *bank)
}
#if 0
static int
pic32mx_handle_part_id_command
(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
COMMAND_HANDLER(
pic32mx_handle_part_id_command)
{
return ERROR_OK;
}
...
...
@@ -672,7 +672,7 @@ static int pic32mx_info(struct flash_bank_s *bank, char *buf, int buf_size)
}
#if 0
int
pic32mx_handle_lock_command
(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
COMMAND_HANDLER(
pic32mx_handle_lock_command)
{
target_t *target = NULL;
pic32mx_flash_bank_t *pic32mx_info = NULL;
...
...
@@ -718,7 +718,7 @@ int pic32mx_handle_lock_command(struct command_context_s *cmd_ctx, char *cmd, ch
return ERROR_OK;
}
int
pic32mx_handle_unlock_command
(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
COMMAND_HANDLER(
pic32mx_handle_unlock_command)
{
target_t *target = NULL;
pic32mx_flash_bank_t *pic32mx_info = NULL;
...
...
@@ -808,7 +808,7 @@ static int pic32mx_chip_erase(struct flash_bank_s *bank)
}
#endif
static
int
pic32mx_handle_chip_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
pic32mx_handle_chip_erase_command
)
{
#if 0
int i;
...
...
@@ -843,7 +843,7 @@ static int pic32mx_handle_chip_erase_command(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
pic32mx_handle_pgm_word_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
pic32mx_handle_pgm_word_command
)
{
uint32_t
address
,
value
;
int
status
,
res
;
...
...
src/flash/stellaris.c
View file @
cfc4d5c6
...
...
@@ -1127,7 +1127,7 @@ static int stellaris_mass_erase(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
stellaris_handle_mass_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stellaris_handle_mass_erase_command
)
{
int
i
;
...
...
src/flash/stm32x.c
View file @
cfc4d5c6
...
...
@@ -780,7 +780,7 @@ static int stm32x_auto_probe(struct flash_bank_s *bank)
}
#if 0
static int
stm32x_handle_part_id_command
(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
COMMAND_HANDLER(
stm32x_handle_part_id_command)
{
return ERROR_OK;
}
...
...
@@ -892,7 +892,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size)
return
ERROR_OK
;
}
static
int
stm32x_handle_lock_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stm32x_handle_lock_command
)
{
target_t
*
target
=
NULL
;
stm32x_flash_bank_t
*
stm32x_info
=
NULL
;
...
...
@@ -938,7 +938,7 @@ static int stm32x_handle_lock_command(struct command_context_s *cmd_ctx, char *c
return
ERROR_OK
;
}
static
int
stm32x_handle_unlock_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stm32x_handle_unlock_command
)
{
target_t
*
target
=
NULL
;
stm32x_flash_bank_t
*
stm32x_info
=
NULL
;
...
...
@@ -981,7 +981,7 @@ static int stm32x_handle_unlock_command(struct command_context_s *cmd_ctx, char
return
ERROR_OK
;
}
static
int
stm32x_handle_options_read_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stm32x_handle_options_read_command
)
{
uint32_t
optionbyte
;
target_t
*
target
=
NULL
;
...
...
@@ -1037,7 +1037,7 @@ static int stm32x_handle_options_read_command(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
stm32x_handle_options_write_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stm32x_handle_options_write_command
)
{
target_t
*
target
=
NULL
;
stm32x_flash_bank_t
*
stm32x_info
=
NULL
;
...
...
@@ -1148,7 +1148,7 @@ static int stm32x_mass_erase(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
stm32x_handle_mass_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
stm32x_handle_mass_erase_command
)
{
int
i
;
...
...
src/flash/str7x.c
View file @
cfc4d5c6
...
...
@@ -589,7 +589,7 @@ static int str7x_probe(struct flash_bank_s *bank)
}
#if 0
static int
str7x_handle_part_id_command
(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
COMMAND_HANDLER(
str7x_handle_part_id_command)
{
return ERROR_OK;
}
...
...
@@ -601,7 +601,7 @@ static int str7x_info(struct flash_bank_s *bank, char *buf, int buf_size)
return
ERROR_OK
;
}
static
int
str7x_handle_disable_jtag_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str7x_handle_disable_jtag_command
)
{
target_t
*
target
=
NULL
;
str7x_flash_bank_t
*
str7x_info
=
NULL
;
...
...
src/flash/str9x.c
View file @
cfc4d5c6
...
...
@@ -619,8 +619,7 @@ static int str9x_probe(struct flash_bank_s *bank)
}
#if 0
static int str9x_handle_part_id_command(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc)
COMMAND_HANDLER(str9x_handle_part_id_command)
{
return ERROR_OK;
}
...
...
@@ -632,8 +631,7 @@ static int str9x_info(struct flash_bank_s *bank, char *buf, int buf_size)
return
ERROR_OK
;
}
static
int
str9x_handle_flash_config_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9x_handle_flash_config_command
)
{
str9x_flash_bank_t
*
str9x_info
;
target_t
*
target
=
NULL
;
...
...
src/flash/str9xpec.c
View file @
cfc4d5c6
...
...
@@ -726,7 +726,7 @@ static int str9xpec_probe(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
str9xpec_handle_part_id_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_part_id_command
)
{
scan_field_t
field
;
uint8_t
*
buffer
=
NULL
;
...
...
@@ -777,7 +777,7 @@ static int str9xpec_info(struct flash_bank_s *bank, char *buf, int buf_size)
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_options_read_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_read_command
)
{
uint8_t
status
;
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
@@ -894,7 +894,7 @@ static int str9xpec_write_options(struct flash_bank_s *bank)
return
status
;
}
static
int
str9xpec_handle_flash_options_write_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_write_command
)
{
uint8_t
status
;
...
...
@@ -917,7 +917,7 @@ static int str9xpec_handle_flash_options_write_command(struct command_context_s
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_options_cmap_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_cmap_command
)
{
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
@@ -946,7 +946,7 @@ static int str9xpec_handle_flash_options_cmap_command(struct command_context_s *
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_options_lvdthd_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_lvdthd_command
)
{
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
@@ -975,7 +975,7 @@ static int str9xpec_handle_flash_options_lvdthd_command(struct command_context_s
return
ERROR_OK
;
}
int
str9xpec_handle_flash_options_lvdsel_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_lvdsel_command
)
{
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
@@ -1004,7 +1004,7 @@ int str9xpec_handle_flash_options_lvdsel_command(struct command_context_s *cmd_c
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_options_lvdwarn_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_options_lvdwarn_command
)
{
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
@@ -1033,7 +1033,7 @@ static int str9xpec_handle_flash_options_lvdwarn_command(struct command_context_
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_lock_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_lock_command
)
{
uint8_t
status
;
...
...
@@ -1056,7 +1056,7 @@ static int str9xpec_handle_flash_lock_command(struct command_context_s *cmd_ctx,
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_unlock_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_unlock_command
)
{
uint8_t
status
;
...
...
@@ -1079,7 +1079,7 @@ static int str9xpec_handle_flash_unlock_command(struct command_context_s *cmd_ct
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_enable_turbo_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_enable_turbo_command
)
{
jtag_tap_t
*
tap0
;
jtag_tap_t
*
tap1
;
...
...
@@ -1128,7 +1128,7 @@ static int str9xpec_handle_flash_enable_turbo_command(struct command_context_s *
return
ERROR_OK
;
}
static
int
str9xpec_handle_flash_disable_turbo_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
str9xpec_handle_flash_disable_turbo_command
)
{
jtag_tap_t
*
tap
;
str9xpec_flash_controller_t
*
str9xpec_info
=
NULL
;
...
...
src/flash/tms470.c
View file @
cfc4d5c6
...
...
@@ -289,7 +289,7 @@ static int tms470_read_part_info(struct flash_bank_s *bank)
static
uint32_t
keysSet
=
0
;
static
uint32_t
flashKeys
[
4
];
static
int
tms470_handle_flash_keyset_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
COMMAND_HANDLER
(
tms470_handle_flash_keyset_command
)
{
if
(
argc
>
4
)
{
...
...
@@ -353,7 +353,7 @@ static const uint32_t FLASH_KEYS_MIX2[] = { 0x0000ffff, 0x0000ffff,
static
int
oscMHz
=
12
;
static
int
tms470_handle_osc_megahertz_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int