]> Git Repo - J-u-boot.git/blame - drivers/scsi/scsi-uclass.c
Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians...
[J-u-boot.git] / drivers / scsi / scsi-uclass.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
e8a016b5
MS
2/*
3 * Copyright (c) 2015 Google, Inc
4 * Written by Simon Glass <[email protected]>
5 * Copyright (c) 2016 Xilinx, Inc
6 * Written by Michal Simek
7 *
8 * Based on ahci-uclass.c
e8a016b5
MS
9 */
10
b953ec2b
PD
11#define LOG_CATEGORY UCLASS_SCSI
12
e8a016b5
MS
13#include <dm.h>
14#include <scsi.h>
15
f6ab5a92
SG
16int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
17{
18 struct scsi_ops *ops = scsi_get_ops(dev);
19
20 if (!ops->exec)
21 return -ENOSYS;
22
23 return ops->exec(dev, pccb);
24}
25
26int scsi_bus_reset(struct udevice *dev)
27{
28 struct scsi_ops *ops = scsi_get_ops(dev);
29
30 if (!ops->bus_reset)
31 return -ENOSYS;
32
33 return ops->bus_reset(dev);
34}
35
e8a016b5
MS
36UCLASS_DRIVER(scsi) = {
37 .id = UCLASS_SCSI,
38 .name = "scsi",
8a8d24bd 39 .per_device_plat_auto = sizeof(struct scsi_plat),
e8a016b5 40};
This page took 0.230907 seconds and 4 git commands to generate.