]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/sata_svw.c
[PATCH] libata-ncq: implement NCQ device configuration
[linux-2.6-omap-h63xx.git] / drivers / scsi / sata_svw.c
index 4aaccd53e7367efc5069cec701f7c4da39df3be0..d5eb5375e265562fc716e3ba1fb4b199005d60a8 100644 (file)
 #endif /* CONFIG_PPC_OF */
 
 #define DRV_NAME       "sata_svw"
-#define DRV_VERSION    "1.07"
-
-/* Taskfile registers offsets */
-#define K2_SATA_TF_CMD_OFFSET          0x00
-#define K2_SATA_TF_DATA_OFFSET         0x00
-#define K2_SATA_TF_ERROR_OFFSET                0x04
-#define K2_SATA_TF_NSECT_OFFSET                0x08
-#define K2_SATA_TF_LBAL_OFFSET         0x0c
-#define K2_SATA_TF_LBAM_OFFSET         0x10
-#define K2_SATA_TF_LBAH_OFFSET         0x14
-#define K2_SATA_TF_DEVICE_OFFSET       0x18
-#define K2_SATA_TF_CMDSTAT_OFFSET              0x1c
-#define K2_SATA_TF_CTL_OFFSET          0x20
-
-/* DMA base */
-#define K2_SATA_DMA_CMD_OFFSET         0x30
-
-/* SCRs base */
-#define K2_SATA_SCR_STATUS_OFFSET      0x40
-#define K2_SATA_SCR_ERROR_OFFSET       0x44
-#define K2_SATA_SCR_CONTROL_OFFSET     0x48
-
-/* Others */
-#define K2_SATA_SICR1_OFFSET           0x80
-#define K2_SATA_SICR2_OFFSET           0x84
-#define K2_SATA_SIM_OFFSET             0x88
-
-/* Port stride */
-#define K2_SATA_PORT_OFFSET            0x100
+#define DRV_VERSION    "1.8"
+
+enum {
+       /* Taskfile registers offsets */
+       K2_SATA_TF_CMD_OFFSET           = 0x00,
+       K2_SATA_TF_DATA_OFFSET          = 0x00,
+       K2_SATA_TF_ERROR_OFFSET         = 0x04,
+       K2_SATA_TF_NSECT_OFFSET         = 0x08,
+       K2_SATA_TF_LBAL_OFFSET          = 0x0c,
+       K2_SATA_TF_LBAM_OFFSET          = 0x10,
+       K2_SATA_TF_LBAH_OFFSET          = 0x14,
+       K2_SATA_TF_DEVICE_OFFSET        = 0x18,
+       K2_SATA_TF_CMDSTAT_OFFSET       = 0x1c,
+       K2_SATA_TF_CTL_OFFSET           = 0x20,
+
+       /* DMA base */
+       K2_SATA_DMA_CMD_OFFSET          = 0x30,
+
+       /* SCRs base */
+       K2_SATA_SCR_STATUS_OFFSET       = 0x40,
+       K2_SATA_SCR_ERROR_OFFSET        = 0x44,
+       K2_SATA_SCR_CONTROL_OFFSET      = 0x48,
+
+       /* Others */
+       K2_SATA_SICR1_OFFSET            = 0x80,
+       K2_SATA_SICR2_OFFSET            = 0x84,
+       K2_SATA_SIM_OFFSET              = 0x88,
+
+       /* Port stride */
+       K2_SATA_PORT_OFFSET             = 0x100,
+};
 
 static u8 k2_stat_check_status(struct ata_port *ap);
 
@@ -255,7 +257,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
        int len, index;
 
        /* Find  the ata_port */
-       ap = (struct ata_port *) &shost->hostdata[0];
+       ap = ata_shost_to_port(shost);
        if (ap == NULL)
                return 0;
 
@@ -288,8 +290,6 @@ static struct scsi_host_template k2_sata_sht = {
        .name                   = DRV_NAME,
        .ioctl                  = ata_scsi_ioctl,
        .queuecommand           = ata_scsi_queuecmd,
-       .eh_timed_out           = ata_scsi_timed_out,
-       .eh_strategy_handler    = ata_scsi_error,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = LIBATA_MAX_PRD,