+ LOG_DEBUG("Initializing PLDs...");
+ return pld_init(CMD_CTX);
+}
+
+static const struct command_registration pld_config_command_handlers[] = {
+ {
+ .name = "device",
+ .mode = COMMAND_CONFIG,
+ .handler = &handle_pld_device_command,
+ .help = "configure a PLD device",
+ .usage = "<driver> ...",
+ },
+ {
+ .name = "init",
+ .mode = COMMAND_CONFIG,
+ .handler = &handle_pld_init_command,
+ .help = "initialize PLD devices",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+static const struct command_registration pld_command_handler[] = {
+ {
+ .name = "pld",
+ .mode = COMMAND_ANY,
+ .help = "programmable logic device commands",
+
+ .chain = pld_config_command_handlers,
+ },
+ COMMAND_REGISTRATION_DONE
+};
+int pld_register_commands(struct command_context *cmd_ctx)
+{
+ return register_commands(cmd_ctx, NULL, pld_command_handler);