aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_sx4.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:16 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:16 -0400
commit15dbb5a3f971a28040ae6cbcd8bbdf19b629fa83 (patch)
treee65562d7300ac653207b1e45ec7e5960ddf78fff /drivers/scsi/sata_sx4.c
parentbe697c3f137c9ed808753bbbc5d7751c6e5303fc (diff)
parent5fadd053d9bb4345ec6f405d24db4e7eb49cf81e (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
-rw-r--r--drivers/scsi/sata_sx4.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
index a9f9f7685a59..1908c588ebb9 100644
--- a/drivers/scsi/sata_sx4.c
+++ b/drivers/scsi/sata_sx4.c
@@ -137,7 +137,7 @@ struct pdc_port_priv {
137}; 137};
138 138
139struct pdc_host_priv { 139struct pdc_host_priv {
140 void *dimm_mmio; 140 void __iomem *dimm_mmio;
141 141
142 unsigned int doing_hdma; 142 unsigned int doing_hdma;
143 unsigned int hdma_prod; 143 unsigned int hdma_prod;
@@ -157,8 +157,8 @@ static void pdc_20621_phy_reset (struct ata_port *ap);
157static int pdc_port_start(struct ata_port *ap); 157static int pdc_port_start(struct ata_port *ap);
158static void pdc_port_stop(struct ata_port *ap); 158static void pdc_port_stop(struct ata_port *ap);
159static void pdc20621_qc_prep(struct ata_queued_cmd *qc); 159static void pdc20621_qc_prep(struct ata_queued_cmd *qc);
160static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); 160static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
161static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); 161static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
162static void pdc20621_host_stop(struct ata_host_set *host_set); 162static void pdc20621_host_stop(struct ata_host_set *host_set);
163static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe); 163static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe);
164static int pdc20621_detect_dimm(struct ata_probe_ent *pe); 164static int pdc20621_detect_dimm(struct ata_probe_ent *pe);
@@ -196,7 +196,7 @@ static Scsi_Host_Template pdc_sata_sht = {
196 .ordered_flush = 1, 196 .ordered_flush = 1,
197}; 197};
198 198
199static struct ata_port_operations pdc_20621_ops = { 199static const struct ata_port_operations pdc_20621_ops = {
200 .port_disable = ata_port_disable, 200 .port_disable = ata_port_disable,
201 .tf_load = pdc_tf_load_mmio, 201 .tf_load = pdc_tf_load_mmio,
202 .tf_read = ata_tf_read, 202 .tf_read = ata_tf_read,
@@ -248,7 +248,7 @@ static void pdc20621_host_stop(struct ata_host_set *host_set)
248{ 248{
249 struct pci_dev *pdev = to_pci_dev(host_set->dev); 249 struct pci_dev *pdev = to_pci_dev(host_set->dev);
250 struct pdc_host_priv *hpriv = host_set->private_data; 250 struct pdc_host_priv *hpriv = host_set->private_data;
251 void *dimm_mmio = hpriv->dimm_mmio; 251 void __iomem *dimm_mmio = hpriv->dimm_mmio;
252 252
253 pci_iounmap(pdev, dimm_mmio); 253 pci_iounmap(pdev, dimm_mmio);
254 kfree(hpriv); 254 kfree(hpriv);
@@ -670,8 +670,8 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
670 readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ 670 readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */
671 671
672 writel(port_ofs + PDC_DIMM_ATA_PKT, 672 writel(port_ofs + PDC_DIMM_ATA_PKT,
673 (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); 673 (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
674 readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); 674 readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
675 VPRINTK("submitted ofs 0x%x (%u), seq %u\n", 675 VPRINTK("submitted ofs 0x%x (%u), seq %u\n",
676 port_ofs + PDC_DIMM_ATA_PKT, 676 port_ofs + PDC_DIMM_ATA_PKT,
677 port_ofs + PDC_DIMM_ATA_PKT, 677 port_ofs + PDC_DIMM_ATA_PKT,
@@ -748,8 +748,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
748 writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); 748 writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4));
749 readl(mmio + PDC_20621_SEQCTL + (seq * 4)); 749 readl(mmio + PDC_20621_SEQCTL + (seq * 4));
750 writel(port_ofs + PDC_DIMM_ATA_PKT, 750 writel(port_ofs + PDC_DIMM_ATA_PKT,
751 (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); 751 (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
752 readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); 752 readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
753 } 753 }
754 754
755 /* step two - execute ATA command */ 755 /* step two - execute ATA command */
@@ -900,7 +900,7 @@ out:
900 DPRINTK("EXIT\n"); 900 DPRINTK("EXIT\n");
901} 901}
902 902
903static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) 903static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
904{ 904{
905 WARN_ON (tf->protocol == ATA_PROT_DMA || 905 WARN_ON (tf->protocol == ATA_PROT_DMA ||
906 tf->protocol == ATA_PROT_NODATA); 906 tf->protocol == ATA_PROT_NODATA);
@@ -908,7 +908,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
908} 908}
909 909
910 910
911static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) 911static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
912{ 912{
913 WARN_ON (tf->protocol == ATA_PROT_DMA || 913 WARN_ON (tf->protocol == ATA_PROT_DMA ||
914 tf->protocol == ATA_PROT_NODATA); 914 tf->protocol == ATA_PROT_NODATA);
@@ -1015,7 +1015,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource,
1015 idx++; 1015 idx++;
1016 dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : 1016 dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size :
1017 (long) (window_size - offset); 1017 (long) (window_size - offset);
1018 memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist); 1018 memcpy_toio(dimm_mmio + offset / 4, psource, dist);
1019 writel(0x01, mmio + PDC_GENERAL_CTLR); 1019 writel(0x01, mmio + PDC_GENERAL_CTLR);
1020 readl(mmio + PDC_GENERAL_CTLR); 1020 readl(mmio + PDC_GENERAL_CTLR);
1021 1021
@@ -1024,8 +1024,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource,
1024 for (; (long) size >= (long) window_size ;) { 1024 for (; (long) size >= (long) window_size ;) {
1025 writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); 1025 writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
1026 readl(mmio + PDC_DIMM_WINDOW_CTLR); 1026 readl(mmio + PDC_DIMM_WINDOW_CTLR);
1027 memcpy_toio((char *) (dimm_mmio), (char *) psource, 1027 memcpy_toio(dimm_mmio, psource, window_size / 4);
1028 window_size / 4);
1029 writel(0x01, mmio + PDC_GENERAL_CTLR); 1028 writel(0x01, mmio + PDC_GENERAL_CTLR);
1030 readl(mmio + PDC_GENERAL_CTLR); 1029 readl(mmio + PDC_GENERAL_CTLR);
1031 psource += window_size; 1030 psource += window_size;
@@ -1036,7 +1035,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource,
1036 if (size) { 1035 if (size) {
1037 writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); 1036 writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
1038 readl(mmio + PDC_DIMM_WINDOW_CTLR); 1037 readl(mmio + PDC_DIMM_WINDOW_CTLR);
1039 memcpy_toio((char *) (dimm_mmio), (char *) psource, size / 4); 1038 memcpy_toio(dimm_mmio, psource, size / 4);
1040 writel(0x01, mmio + PDC_GENERAL_CTLR); 1039 writel(0x01, mmio + PDC_GENERAL_CTLR);
1041 readl(mmio + PDC_GENERAL_CTLR); 1040 readl(mmio + PDC_GENERAL_CTLR);
1042 } 1041 }