From: Simon Glass Date: Mon, 5 Jun 2017 13:15:07 -0600 Subject: [U-Boot] [PATCH 20/29] dm: scsi: Add operations In-Reply-To: <20170605191517.12376-1-sjg@chromium.org> References: <20170605191517.12376-1-sjg@chromium.org> Message-ID: <20170605191517.12376-21-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add operations for SCSI. These are not yet implemented, but we have the struct. Signed-off-by: Simon Glass --- include/scsi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/scsi.h b/include/scsi.h index cd1b240855..d2fa8a5195 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); -- 2.13.0.506.g27d5fe0cd-goog