]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: scsi: Add operations
authorSimon Glass <sjg@chromium.org>
Thu, 15 Jun 2017 03:28:39 +0000 (21:28 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:19 +0000 (10:08 -0600)
Add operations for SCSI. These are not yet implemented, but we have the
struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/scsi.h

index cd1b240855f7a3259e5ad42c99c25aa92fc22e95..d2fa8a51952cd3107ddc8fc2fd0116bbd4034d1d 100644 (file)
@@ -171,6 +171,26 @@ struct scsi_platdata {
        unsigned long max_id;
 };
 
+/* Operations for SCSI */
+struct scsi_ops {
+       /**
+        * exec() - execute a command
+        *
+        * @dev:        SCSI bus
+        * @cmd:        Command to execute
+        * @return 0 if OK, -ve on error
+        */
+       int (*exec)(struct udevice *dev, struct scsi_cmd *cmd);
+
+       /**
+        * bus_reset() - reset the bus
+        *
+        * @dev:        SCSI bus to reset
+        * @return 0 if OK, -ve on error
+        */
+       int (*bus_reset)(struct udevice *dev);
+};
+
 #ifndef CONFIG_DM_SCSI
 void scsi_low_level_init(int busdevfunc);
 void scsi_init(void);