]> git.sur5r.net Git - u-boot/blobdiff - drivers/scsi/scsi-uclass.c
mtd: nand: mxs_nand: use self init
[u-boot] / drivers / scsi / scsi-uclass.c
index 40c5044f093194f11d9c84e0a76d535c155ada41..acf3b3dc9570483b408676f089149d4be31a78d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
@@ -5,14 +6,32 @@
  * Written by Michal Simek
  *
  * Based on ahci-uclass.c
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <dm.h>
 #include <scsi.h>
 
+int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
+{
+       struct scsi_ops *ops = scsi_get_ops(dev);
+
+       if (!ops->exec)
+               return -ENOSYS;
+
+       return ops->exec(dev, pccb);
+}
+
+int scsi_bus_reset(struct udevice *dev)
+{
+       struct scsi_ops *ops = scsi_get_ops(dev);
+
+       if (!ops->bus_reset)
+               return -ENOSYS;
+
+       return ops->bus_reset(dev);
+}
+
 UCLASS_DRIVER(scsi) = {
        .id             = UCLASS_SCSI,
        .name           = "scsi",