+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2001
* Denis Peter, MPL AG Switzerland
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _SCSI_H
#define _SCSI_H
+#include <asm/cache.h>
+#include <linux/dma-direction.h>
+
struct scsi_cmd {
unsigned char cmd[16]; /* command */
/* for request sense */
unsigned long trans_bytes; /* tranfered bytes */
unsigned int priv;
+ enum dma_data_direction dma_dir;
};
/*-----------------------------------------------------------
* @base: Controller base address
* @max_lun: Maximum number of logical units
* @max_id: Maximum number of target ids
+ * @max_bytes_per_req: Maximum number of bytes per read/write request
*/
struct scsi_platdata {
unsigned long base;
unsigned long max_lun;
unsigned long max_id;
+ unsigned long max_bytes_per_req;
};
/* Operations for SCSI */
*/
int scsi_scan(bool verbose);
+/**
+ * scsi_scan_dev() - scan a SCSI bus and create devices
+ *
+ * @dev: SCSI bus
+ * @verbose: true to show information about each device found
+ */
+int scsi_scan_dev(struct udevice *dev, bool verbose);
+
#ifndef CONFIG_DM_SCSI
void scsi_low_level_init(int busdevfunc);
void scsi_init(void);