]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/scsi.h
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
[karo-tx-uboot.git] / include / scsi.h
index aaafc9ca7902713f6fec72f9e7c8d1fe941d9f44..c764e159fea709f12b77db6ed7d1c71b94cc0775 100644 (file)
@@ -26,7 +26,9 @@
 
 typedef struct SCSI_cmd_block{
        unsigned char           cmd[16];                                        /* command                                 */
-       unsigned char           sense_buf[64];          /* for request sense */
+       /* for request sense */
+       unsigned char           sense_buf[64]
+               __attribute__((aligned(ARCH_DMA_MINALIGN)));
        unsigned char           status;                                         /* SCSI Status                   */
        unsigned char           target;                                         /* Target ID                             */
        unsigned char           lun;                                                    /* Target LUN        */
@@ -148,6 +150,8 @@ typedef struct SCSI_cmd_block{
 #define SCSI_READ6             0x08            /* Read 6-byte (MANDATORY) */
 #define SCSI_READ10            0x28            /* Read 10-byte (MANDATORY) */
 #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) */
 #define SCSI_RD_DEFECT 0x37            /* Read Defect Data (O) */
 #define SCSI_READ_LONG 0x3E            /* Read Long (O) */
 #define SCSI_REASS_BLK 0x07            /* Reassign Blocks (O) */
@@ -185,7 +189,10 @@ void scsi_low_level_init(int busdevfunc);
  * functions residing inside cmd_scsi.c
  */
 void scsi_init(void);
+void scsi_scan(int mode);
 
+/** @return the number of scsi disks */
+int scsi_get_disk_count(void);
 
 #define SCSI_IDENTIFY                                  0xC0  /* not used */
 
@@ -197,12 +204,4 @@ void scsi_init(void);
 
 #define SCSI_INT_STATE                          0x00010000  /* unknown Interrupt number is stored in 16 LSB */
 
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
 #endif /* _SCSI_H */