diff options
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
-rw-r--r-- | drivers/scsi/sata_sx4.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 540a85191172..af08f4f650c1 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 | ||
139 | struct pdc_host_priv { | 139 | struct 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); | |||
157 | static int pdc_port_start(struct ata_port *ap); | 157 | static int pdc_port_start(struct ata_port *ap); |
158 | static void pdc_port_stop(struct ata_port *ap); | 158 | static void pdc_port_stop(struct ata_port *ap); |
159 | static void pdc20621_qc_prep(struct ata_queued_cmd *qc); | 159 | static void pdc20621_qc_prep(struct ata_queued_cmd *qc); |
160 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); | 160 | static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf); |
161 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); | 161 | static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf); |
162 | static void pdc20621_host_stop(struct ata_host_set *host_set); | 162 | static void pdc20621_host_stop(struct ata_host_set *host_set); |
163 | static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe); | 163 | static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe); |
164 | static int pdc20621_detect_dimm(struct ata_probe_ent *pe); | 164 | static 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 | ||
199 | static struct ata_port_operations pdc_20621_ops = { | 199 | static 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, |
@@ -247,7 +247,7 @@ static void pdc20621_host_stop(struct ata_host_set *host_set) | |||
247 | { | 247 | { |
248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | 248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); |
249 | struct pdc_host_priv *hpriv = host_set->private_data; | 249 | struct pdc_host_priv *hpriv = host_set->private_data; |
250 | void *dimm_mmio = hpriv->dimm_mmio; | 250 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
251 | 251 | ||
252 | pci_iounmap(pdev, dimm_mmio); | 252 | pci_iounmap(pdev, dimm_mmio); |
253 | kfree(hpriv); | 253 | kfree(hpriv); |
@@ -669,8 +669,8 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
669 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ | 669 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ |
670 | 670 | ||
671 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 671 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
672 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 672 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
673 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 673 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
674 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", | 674 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", |
675 | port_ofs + PDC_DIMM_ATA_PKT, | 675 | port_ofs + PDC_DIMM_ATA_PKT, |
676 | port_ofs + PDC_DIMM_ATA_PKT, | 676 | port_ofs + PDC_DIMM_ATA_PKT, |
@@ -747,8 +747,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
747 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); | 747 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); |
748 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); | 748 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); |
749 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 749 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
750 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 750 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
751 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 751 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
752 | } | 752 | } |
753 | 753 | ||
754 | /* step two - execute ATA command */ | 754 | /* step two - execute ATA command */ |
@@ -899,7 +899,7 @@ out: | |||
899 | DPRINTK("EXIT\n"); | 899 | DPRINTK("EXIT\n"); |
900 | } | 900 | } |
901 | 901 | ||
902 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 902 | static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf) |
903 | { | 903 | { |
904 | WARN_ON (tf->protocol == ATA_PROT_DMA || | 904 | WARN_ON (tf->protocol == ATA_PROT_DMA || |
905 | tf->protocol == ATA_PROT_NODATA); | 905 | tf->protocol == ATA_PROT_NODATA); |
@@ -907,7 +907,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) | |||
907 | } | 907 | } |
908 | 908 | ||
909 | 909 | ||
910 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 910 | static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf) |
911 | { | 911 | { |
912 | WARN_ON (tf->protocol == ATA_PROT_DMA || | 912 | WARN_ON (tf->protocol == ATA_PROT_DMA || |
913 | tf->protocol == ATA_PROT_NODATA); | 913 | tf->protocol == ATA_PROT_NODATA); |
@@ -1014,7 +1014,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1014 | idx++; | 1014 | idx++; |
1015 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : | 1015 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : |
1016 | (long) (window_size - offset); | 1016 | (long) (window_size - offset); |
1017 | memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist); | 1017 | memcpy_toio(dimm_mmio + offset / 4, psource, dist); |
1018 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1018 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1019 | readl(mmio + PDC_GENERAL_CTLR); | 1019 | readl(mmio + PDC_GENERAL_CTLR); |
1020 | 1020 | ||
@@ -1023,8 +1023,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1023 | for (; (long) size >= (long) window_size ;) { | 1023 | for (; (long) size >= (long) window_size ;) { |
1024 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1024 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1025 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1025 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1026 | memcpy_toio((char *) (dimm_mmio), (char *) psource, | 1026 | memcpy_toio(dimm_mmio, psource, window_size / 4); |
1027 | window_size / 4); | ||
1028 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1027 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1029 | readl(mmio + PDC_GENERAL_CTLR); | 1028 | readl(mmio + PDC_GENERAL_CTLR); |
1030 | psource += window_size; | 1029 | psource += window_size; |
@@ -1035,7 +1034,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1035 | if (size) { | 1034 | if (size) { |
1036 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1035 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1037 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1036 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1038 | memcpy_toio((char *) (dimm_mmio), (char *) psource, size / 4); | 1037 | memcpy_toio(dimm_mmio, psource, size / 4); |
1039 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1038 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1040 | readl(mmio + PDC_GENERAL_CTLR); | 1039 | readl(mmio + PDC_GENERAL_CTLR); |
1041 | } | 1040 | } |