]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/scsi.h
rockchip: rk3368: add Sheep board
[people/ms/u-boot.git] / include / scsi.h
index c764e159fea709f12b77db6ed7d1c71b94cc0775..190dacd0f2ec1688885fbe824a5f84efdc4322fd 100644 (file)
@@ -2,24 +2,7 @@
  * (C) Copyright 2001
  * Denis Peter, MPL AG Switzerland
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
  #ifndef _SCSI_H
  #define _SCSI_H
@@ -149,6 +132,7 @@ typedef struct SCSI_cmd_block{
 #define SCSI_MED_REMOVL        0x1E            /* Prevent/Allow medium Removal (O) */
 #define SCSI_READ6             0x08            /* Read 6-byte (MANDATORY) */
 #define SCSI_READ10            0x28            /* Read 10-byte (MANDATORY) */
+#define SCSI_READ16    0x48
 #define SCSI_RD_CAPAC  0x25            /* Read Capacity (MANDATORY) */
 #define SCSI_RD_CAPAC10        SCSI_RD_CAPAC   /* Read Capacity (10) */
 #define SCSI_RD_CAPAC16        0x9e            /* Read Capacity (16) */
@@ -182,17 +166,32 @@ typedef struct SCSI_cmd_block{
 void scsi_print_error(ccb *pccb);
 int scsi_exec(ccb *pccb);
 void scsi_bus_reset(void);
+#if !defined(CONFIG_DM_SCSI)
 void scsi_low_level_init(int busdevfunc);
-
+#else
+void scsi_low_level_init(int busdevfunc, struct udevice *dev);
+#endif
 
 /***************************************************************************
  * functions residing inside cmd_scsi.c
  */
 void scsi_init(void);
-void scsi_scan(int mode);
+int scsi_scan(int mode);
 
-/** @return the number of scsi disks */
-int scsi_get_disk_count(void);
+#if defined(CONFIG_DM_SCSI)
+/**
+ * struct scsi_platdata - stores information about SCSI controller
+ *
+ * @base: Controller base address
+ * @max_lun: Maximum number of logical units
+ * @max_id: Maximum number of target ids
+ */
+struct scsi_platdata {
+       unsigned long base;
+       unsigned long max_lun;
+       unsigned long max_id;
+};
+#endif
 
 #define SCSI_IDENTIFY                                  0xC0  /* not used */