]> git.sur5r.net Git - u-boot/blobdiff - drivers/scsi/scsi-uclass.c
video: anx9804: split out registers definitions into a separate header
[u-boot] / drivers / scsi / scsi-uclass.c
index 05da6cdeab8d98a00bc2a9588451cf56e95bc360..31e8999297196cad628d4de381b76e9f59e438fa 100644 (file)
 #include <dm.h>
 #include <scsi.h>
 
-static int scsi_post_probe(struct udevice *dev)
+int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
 {
-       debug("%s: device %p\n", __func__, dev);
-       scsi_low_level_init(0, dev);
-       return 0;
+       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",
-       .post_probe      = scsi_post_probe,
+       .per_device_platdata_auto_alloc_size = sizeof(struct scsi_platdata),
 };