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");
if (!flash_banks)
return ERROR_OK;
return register_commands(cmd_ctx, parent, flash_exec_command_handlers);
}
-
static const struct command_registration flash_config_command_handlers[] = {
{
.name = "bank",
.help = "Define a new bank with the given name, "
"using the specified NOR flash driver.",
},
+ {
+ .name = "banks",
+ .mode = COMMAND_ANY,
+ .jim_handler = &jim_flash_banks,
+ .help = "return information about the flash banks",
+ },
COMMAND_REGISTRATION_DONE
};
static const struct command_registration flash_command_handlers[] = {