mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-23 11:33:32 +00:00
b953ec2bca
Define LOG_CATEGORY for all uclass to allow filtering with log command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
41 lines
752 B
C
41 lines
752 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (c) 2015 Google, Inc
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
* Copyright (c) 2016 Xilinx, Inc
|
|
* Written by Michal Simek
|
|
*
|
|
* Based on ahci-uclass.c
|
|
*/
|
|
|
|
#define LOG_CATEGORY UCLASS_SCSI
|
|
|
|
#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",
|
|
.per_device_plat_auto = sizeof(struct scsi_plat),
|
|
};
|