-
-/****************************************************************************
- * decleration of functions which have to reside in the LowLevel Part Driver
+/**
+ * struct scsi_platdata - stores information about SCSI controller
+ *
+ * @base: Controller base address
+ * @max_lun: Maximum number of logical units
+ * @max_id: Maximum number of target ids
+ */
+struct scsi_platdata {
+ unsigned long base;
+ unsigned long max_lun;
+ 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);
+};
+
+#define scsi_get_ops(dev) ((struct scsi_ops *)(dev)->driver->ops)
+
+extern struct scsi_ops scsi_ops;
+
+/**
+ * scsi_exec() - execute a command
+ *
+ * @dev: SCSI bus
+ * @cmd: Command to execute
+ * @return 0 if OK, -ve on error