command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
This commit is contained in:
@@ -231,7 +231,7 @@ struct sam3_reg_list {
|
||||
static struct sam3_chip *all_sam3_chips;
|
||||
|
||||
static struct sam3_chip *
|
||||
get_current_sam3(struct command_context_s *cmd_ctx)
|
||||
get_current_sam3(struct command_context *cmd_ctx)
|
||||
{
|
||||
struct target *t;
|
||||
static struct sam3_chip *p;
|
||||
@@ -2472,7 +2472,7 @@ COMMAND_HANDLER(sam3_handle_slowclk_command)
|
||||
|
||||
static int sam3_registered;
|
||||
static int
|
||||
sam3_register_commands(struct command_context_s *cmd_ctx)
|
||||
sam3_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *pCmd;
|
||||
|
||||
|
||||
@@ -1178,7 +1178,7 @@ COMMAND_HANDLER(at91sam7_handle_gpnvm_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int at91sam7_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int at91sam7_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *at91sam7_cmd = register_command(cmd_ctx, NULL, "at91sam7",
|
||||
NULL, COMMAND_ANY, NULL);
|
||||
|
||||
+1
-1
@@ -449,7 +449,7 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int avrf_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int avrf_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *avr_cmd = register_command(cmd_ctx, NULL, "avr",
|
||||
NULL, COMMAND_ANY, "avr flash specific commands");
|
||||
|
||||
+1
-1
@@ -588,7 +588,7 @@ static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int cfi_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int cfi_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
/*command_t *cfi_cmd = */
|
||||
register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, "flash bank cfi <base> <size> <chip_width> <bus_width> <targetNum> [jedec_probe/x16_as_x8]");
|
||||
|
||||
@@ -78,7 +78,7 @@ static int halted(struct target *target, const char *label)
|
||||
return false;
|
||||
}
|
||||
|
||||
static int davinci_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int davinci_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@
|
||||
static uint32_t ecosflash_get_flash_status(struct flash_bank *bank);
|
||||
static void ecosflash_set_flash_mode(struct flash_bank *bank,int mode);
|
||||
static uint32_t ecosflash_wait_status_busy(struct flash_bank *bank, uint32_t waitbits, int timeout);
|
||||
static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
|
||||
static int ecosflash_handle_gpnvm_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
|
||||
#endif
|
||||
|
||||
struct ecosflash_flash_bank
|
||||
@@ -334,7 +334,7 @@ static int ecosflash_probe(struct flash_bank *bank)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int ecosflash_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int ecosflash_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
register_command(cmd_ctx, NULL, "ecosflash", NULL, COMMAND_ANY, NULL);
|
||||
|
||||
@@ -429,7 +429,7 @@ static uint32_t ecosflash_wait_status_busy(struct flash_bank *bank, uint32_t wai
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
|
||||
static int ecosflash_handle_gpnvm_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ FLASH_BANK_COMMAND_HANDLER(faux_flash_bank_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int faux_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int faux_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
+4
-4
@@ -199,7 +199,7 @@ struct flash_bank *get_flash_bank_by_num(int num)
|
||||
}
|
||||
|
||||
int flash_command_get_bank_by_num(
|
||||
struct command_context_s *cmd_ctx, const char *str, struct flash_bank **bank)
|
||||
struct command_context *cmd_ctx, const char *str, struct flash_bank **bank)
|
||||
{
|
||||
unsigned bank_num;
|
||||
COMMAND_PARSE_NUMBER(uint, str, bank_num);
|
||||
@@ -511,7 +511,7 @@ COMMAND_HANDLER(handle_flash_protect_check_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int flash_check_sector_parameters(struct command_context_s *cmd_ctx,
|
||||
static int flash_check_sector_parameters(struct command_context *cmd_ctx,
|
||||
uint32_t first, uint32_t last, uint32_t num_sectors)
|
||||
{
|
||||
if (!(first <= last)) {
|
||||
@@ -1217,7 +1217,7 @@ int default_flash_blank_check(struct flash_bank *bank)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int flash_init_drivers(struct command_context_s *cmd_ctx)
|
||||
int flash_init_drivers(struct command_context *cmd_ctx)
|
||||
{
|
||||
register_jim(cmd_ctx, "ocd_flash_banks",
|
||||
jim_flash_banks, "return information about the flash banks");
|
||||
@@ -1267,7 +1267,7 @@ int flash_init_drivers(struct command_context_s *cmd_ctx)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int flash_register_commands(struct command_context_s *cmd_ctx)
|
||||
int flash_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
flash_cmd = register_command(cmd_ctx, NULL, "flash",
|
||||
NULL, COMMAND_ANY, NULL);
|
||||
|
||||
+4
-4
@@ -97,7 +97,7 @@ struct flash_driver
|
||||
*
|
||||
* @returns ERROR_OK if successful; otherwise, an error code.
|
||||
*/
|
||||
int (*register_commands)(struct command_context_s *cmd_ctx);
|
||||
int (*register_commands)(struct command_context *cmd_ctx);
|
||||
|
||||
/**
|
||||
* Finish the "flash bank" command for @a bank. The
|
||||
@@ -265,9 +265,9 @@ struct flash_bank
|
||||
};
|
||||
|
||||
/// Registers the 'flash' subsystem commands
|
||||
int flash_register_commands(struct command_context_s *cmd_ctx);
|
||||
int flash_register_commands(struct command_context *cmd_ctx);
|
||||
/// Initializes the 'flash' subsystem drivers
|
||||
int flash_init_drivers(struct command_context_s *cmd_ctx);
|
||||
int flash_init_drivers(struct command_context *cmd_ctx);
|
||||
|
||||
/**
|
||||
* Erases @a length bytes in the @a target flash, starting at @a addr.
|
||||
@@ -323,7 +323,7 @@ struct flash_bank *get_flash_bank_by_num(int num);
|
||||
* @param bank On output, contians a pointer to the bank or NULL.
|
||||
* @returns ERROR_OK on success, or an error indicating the problem.
|
||||
*/
|
||||
int flash_command_get_bank_by_num(struct command_context_s *cmd_ctx,
|
||||
int flash_command_get_bank_by_num(struct command_context *cmd_ctx,
|
||||
const char *str, struct flash_bank **bank);
|
||||
/**
|
||||
* Returns the flash bank like get_flash_bank_by_num(), without probing.
|
||||
|
||||
+1
-1
@@ -776,7 +776,7 @@ COMMAND_HANDLER(lpc2000_handle_part_id_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int lpc2000_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int lpc2000_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *lpc2000_cmd = register_command(cmd_ctx, NULL, "lpc2000",
|
||||
NULL, COMMAND_ANY, NULL);
|
||||
|
||||
+1
-1
@@ -952,7 +952,7 @@ COMMAND_HANDLER(lpc2900_handle_secure_jtag_command)
|
||||
/**
|
||||
* Register private command handlers.
|
||||
*/
|
||||
static int lpc2900_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int lpc2900_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *lpc2900_cmd = register_command(cmd_ctx, NULL, "lpc2900",
|
||||
NULL, COMMAND_ANY, NULL);
|
||||
|
||||
@@ -873,7 +873,7 @@ COMMAND_HANDLER(handle_lpc3180_select_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int lpc3180_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int lpc3180_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *lpc3180_cmd = register_command(cmd_ctx, NULL, "lpc3180", NULL, COMMAND_ANY, "commands specific to the LPC3180 NAND flash controllers");
|
||||
|
||||
|
||||
+2
-2
@@ -1265,7 +1265,7 @@ COMMAND_HANDLER(mg_config_cmd)
|
||||
}
|
||||
}
|
||||
|
||||
int mflash_init_drivers(struct command_context_s *cmd_ctx)
|
||||
int mflash_init_drivers(struct command_context *cmd_ctx)
|
||||
{
|
||||
if (mflash_bank) {
|
||||
register_command(cmd_ctx, mflash_cmd, "probe", mg_probe_cmd, COMMAND_EXEC, NULL);
|
||||
@@ -1320,7 +1320,7 @@ COMMAND_HANDLER(mg_bank_cmd)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int mflash_register_commands(struct command_context_s *cmd_ctx)
|
||||
int mflash_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL);
|
||||
register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG,
|
||||
|
||||
+2
-2
@@ -141,8 +141,8 @@ struct mflash_bank
|
||||
struct mg_drv_info *drv_info;
|
||||
};
|
||||
|
||||
int mflash_register_commands(struct command_context_s *cmd_ctx);
|
||||
int mflash_init_drivers(struct command_context_s *cmd_ctx);
|
||||
int mflash_register_commands(struct command_context *cmd_ctx);
|
||||
int mflash_init_drivers(struct command_context *cmd_ctx);
|
||||
|
||||
#define MG_MFLASH_SECTOR_SIZE (0x200) /* 512Bytes = 2^9 */
|
||||
#define MG_MFLASH_SECTOR_SIZE_MASK (0x200-1)
|
||||
|
||||
@@ -315,7 +315,7 @@ static int imx31_nand_ready (struct nand_device *nand, int timeout)
|
||||
return imx31_controller_ready (nand, timeout);
|
||||
}
|
||||
|
||||
static int imx31_register_commands (struct command_context_s *cmd_ctx)
|
||||
static int imx31_register_commands (struct command_context *cmd_ctx)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
+3
-3
@@ -279,7 +279,7 @@ COMMAND_HANDLER(handle_nand_device_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int nand_register_commands(struct command_context_s *cmd_ctx)
|
||||
int nand_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
nand_cmd = register_command(cmd_ctx, NULL, "nand", NULL, COMMAND_ANY, "NAND specific commands");
|
||||
|
||||
@@ -304,7 +304,7 @@ struct nand_device *get_nand_device_by_num(int num)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int nand_command_get_device_by_num(struct command_context_s *cmd_ctx,
|
||||
int nand_command_get_device_by_num(struct command_context *cmd_ctx,
|
||||
const char *str, struct nand_device **nand)
|
||||
{
|
||||
unsigned num;
|
||||
@@ -1602,7 +1602,7 @@ COMMAND_HANDLER(handle_nand_raw_access_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int nand_init(struct command_context_s *cmd_ctx)
|
||||
int nand_init(struct command_context *cmd_ctx)
|
||||
{
|
||||
if (!nand_devices)
|
||||
return ERROR_OK;
|
||||
|
||||
+4
-4
@@ -36,7 +36,7 @@ struct nand_flash_controller
|
||||
{
|
||||
char *name;
|
||||
__NAND_DEVICE_COMMAND((*nand_device_command));
|
||||
int (*register_commands)(struct command_context_s *cmd_ctx);
|
||||
int (*register_commands)(struct command_context *cmd_ctx);
|
||||
int (*init)(struct nand_device *nand);
|
||||
int (*reset)(struct nand_device *nand);
|
||||
int (*command)(struct nand_device *nand, uint8_t command);
|
||||
@@ -226,11 +226,11 @@ int nand_calculate_ecc(struct nand_device *nand,
|
||||
int nand_calculate_ecc_kw(struct nand_device *nand,
|
||||
const uint8_t *dat, uint8_t *ecc_code);
|
||||
|
||||
int nand_register_commands(struct command_context_s *cmd_ctx);
|
||||
int nand_init(struct command_context_s *cmd_ctx);
|
||||
int nand_register_commands(struct command_context *cmd_ctx);
|
||||
int nand_init(struct command_context *cmd_ctx);
|
||||
|
||||
/// helper for parsing a nand device command argument string
|
||||
int nand_command_get_device_by_num(struct command_context_s *cmd_ctx,
|
||||
int nand_command_get_device_by_num(struct command_context *cmd_ctx,
|
||||
const char *str, struct nand_device **nand);
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ static int orion_nand_controller_ready(struct nand_device *nand, int timeout)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int orion_nand_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int orion_nand_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
+1
-1
@@ -883,7 +883,7 @@ COMMAND_HANDLER(pic32mx_handle_pgm_word_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int pic32mx_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int pic32mx_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *pic32mx_cmd = register_command(cmd_ctx, NULL, "pic32mx",
|
||||
NULL, COMMAND_ANY, "pic32mx flash specific commands");
|
||||
|
||||
@@ -52,7 +52,7 @@ S3C24XX_DEVICE_COMMAND()
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int s3c24xx_register_commands(struct command_context_s *cmd_ctx)
|
||||
int s3c24xx_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ S3C24XX_DEVICE_COMMAND();
|
||||
return retval; \
|
||||
} while (0)
|
||||
|
||||
int s3c24xx_register_commands(struct command_context_s *cmd_ctx);
|
||||
int s3c24xx_register_commands(struct command_context *cmd_ctx);
|
||||
|
||||
int s3c24xx_reset(struct nand_device *nand);
|
||||
|
||||
|
||||
@@ -1160,7 +1160,7 @@ COMMAND_HANDLER(stellaris_handle_mass_erase_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int stellaris_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int stellaris_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *stm32x_cmd = register_command(cmd_ctx, NULL, "stellaris",
|
||||
NULL, COMMAND_ANY, "stellaris flash specific commands");
|
||||
|
||||
+1
-1
@@ -1181,7 +1181,7 @@ COMMAND_HANDLER(stm32x_handle_mass_erase_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int stm32x_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int stm32x_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *stm32x_cmd = register_command(cmd_ctx, NULL, "stm32x",
|
||||
NULL, COMMAND_ANY, "stm32x flash specific commands");
|
||||
|
||||
+1
-1
@@ -671,7 +671,7 @@ COMMAND_HANDLER(str7x_handle_disable_jtag_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int str7x_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int str7x_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *str7x_cmd = register_command(cmd_ctx, NULL, "str7x",
|
||||
NULL, COMMAND_ANY, "str7x flash specific commands");
|
||||
|
||||
+1
-1
@@ -675,7 +675,7 @@ COMMAND_HANDLER(str9x_handle_flash_config_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int str9x_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int str9x_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *str9x_cmd = register_command(cmd_ctx, NULL, "str9x",
|
||||
NULL, COMMAND_ANY, "str9x flash commands");
|
||||
|
||||
@@ -1163,7 +1163,7 @@ COMMAND_HANDLER(str9xpec_handle_flash_disable_turbo_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int str9xpec_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int str9xpec_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *str9xpec_cmd = register_command(cmd_ctx, NULL, "str9xpec",
|
||||
NULL, COMMAND_ANY, "str9xpec flash specific commands");
|
||||
|
||||
+1
-1
@@ -817,7 +817,7 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector)
|
||||
Implementation of Flash Driver Interfaces
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
static int tms470_register_commands(struct command_context_s *cmd_ctx)
|
||||
static int tms470_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
command_t *tms470_cmd = register_command(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user