+
+static const struct command_registration str9xpec_config_command_handlers[] = {
+ {
+ .name = "enable_turbo",
+ .handler = str9xpec_handle_flash_enable_turbo_command,
+ .mode = COMMAND_EXEC,
+ .help = "enable str9xpec turbo mode",
+ },
+ {
+ .name = "disable_turbo",
+ .handler = str9xpec_handle_flash_disable_turbo_command,
+ .mode = COMMAND_EXEC,
+ .help = "disable str9xpec turbo mode",
+ },
+ {
+ .name = "options_cmap",
+ .handler = str9xpec_handle_flash_options_cmap_command,
+ .mode = COMMAND_EXEC,
+ .help = "configure str9xpec boot sector",
+ },
+ {
+ .name = "options_lvdthd",
+ .handler = str9xpec_handle_flash_options_lvdthd_command,
+ .mode = COMMAND_EXEC,
+ .help = "configure str9xpec lvd threshold",
+ },
+ {
+ .name = "options_lvdsel",
+ .handler = str9xpec_handle_flash_options_lvdsel_command,
+ .mode = COMMAND_EXEC,
+ .help = "configure str9xpec lvd selection",
+ },
+ {
+ .name = "options_lvdwarn",
+ .handler = str9xpec_handle_flash_options_lvdwarn_command,
+ .mode = COMMAND_EXEC,
+ .help = "configure str9xpec lvd warning",
+ },
+ {
+ .name = "options_read",
+ .handler = str9xpec_handle_flash_options_read_command,
+ .mode = COMMAND_EXEC,
+ .help = "read str9xpec options",
+ },
+ {
+ .name = "options_write",
+ .handler = str9xpec_handle_flash_options_write_command,
+ .mode = COMMAND_EXEC,
+ .help = "write str9xpec options",
+ },
+ {
+ .name = "lock",
+ .handler = str9xpec_handle_flash_lock_command,
+ .mode = COMMAND_EXEC,
+ .help = "lock str9xpec device",
+ },
+ {
+ .name = "unlock",
+ .handler = str9xpec_handle_flash_unlock_command,
+ .mode = COMMAND_EXEC,
+ .help = "unlock str9xpec device",
+ },
+ {
+ .name = "part_id",
+ .handler = str9xpec_handle_part_id_command,
+ .mode = COMMAND_EXEC,
+ .help = "print part id of str9xpec flash bank <num>",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+static const struct command_registration str9xpec_command_handlers[] = {
+ {
+ .name = "str9xpec",
+ .mode = COMMAND_ANY,
+ .help = "str9xpec flash command group",
+ .chain = str9xpec_config_command_handlers,
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
+struct flash_driver str9xpec_flash = {
+ .name = "str9xpec",
+ .commands = str9xpec_command_handlers,
+ .flash_bank_command = &str9xpec_flash_bank_command,
+ .erase = &str9xpec_erase,
+ .protect = &str9xpec_protect,
+ .write = &str9xpec_write,
+ .probe = &str9xpec_probe,
+ .auto_probe = &str9xpec_probe,
+ .erase_check = &str9xpec_erase_check,
+ .protect_check = &str9xpec_protect_check,
+ .info = &str9xpec_info,
+ };