summaryrefslogtreecommitdiff
path: root/include/scsi.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-15 03:28:39 (GMT)
committerSimon Glass <sjg@chromium.org>2017-07-11 16:08:19 (GMT)
commit322f73f473d921dbdd0fe11bd62db6a00e5b133c (patch)
tree6b224fcce9ad5a2b7c94a69def02932bbfb7bfee /include/scsi.h
parent4279efc4c949116535bb99f4aa74260d93f82b92 (diff)
downloadu-boot-fsl-qoriq-322f73f473d921dbdd0fe11bd62db6a00e5b133c.tar.xz
dm: scsi: Add operations
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>
Diffstat (limited to 'include/scsi.h')
-rw-r--r--include/scsi.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/scsi.h b/include/scsi.h
index cd1b240..d2fa8a5 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -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);