diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:29:23 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:29:23 -0400 |
commit | 7a9f8f93d2dad38f30fbc79d8a1e6517373aa4b6 (patch) | |
tree | 9116e5bde860d00685c5b6eee7be5ba9899aabb9 /drivers/scsi/sata_sx4.c | |
parent | 972c26bdd6b58e7534473c4f7928584578cf43f4 (diff) | |
parent | 5fadd053d9bb4345ec6f405d24db4e7eb49cf81e (diff) |
Merge branch 'master'
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 79fdbbab513e..8710d0f14f93 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); |
@@ -668,8 +668,8 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
668 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ | 668 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ |
669 | 669 | ||
670 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 670 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
671 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 671 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
672 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 672 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
673 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", | 673 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", |
674 | port_ofs + PDC_DIMM_ATA_PKT, | 674 | port_ofs + PDC_DIMM_ATA_PKT, |
675 | port_ofs + PDC_DIMM_ATA_PKT, | 675 | port_ofs + PDC_DIMM_ATA_PKT, |
@@ -746,8 +746,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
746 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); | 746 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); |
747 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); | 747 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); |
748 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 748 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
749 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 749 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
750 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 750 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
751 | } | 751 | } |
752 | 752 | ||
753 | /* step two - execute ATA command */ | 753 | /* step two - execute ATA command */ |
@@ -898,7 +898,7 @@ out: | |||
898 | DPRINTK("EXIT\n"); | 898 | DPRINTK("EXIT\n"); |
899 | } | 899 | } |
900 | 900 | ||
901 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 901 | static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf) |
902 | { | 902 | { |
903 | WARN_ON (tf->protocol == ATA_PROT_DMA || | 903 | WARN_ON (tf->protocol == ATA_PROT_DMA || |
904 | tf->protocol == ATA_PROT_NODATA); | 904 | tf->protocol == ATA_PROT_NODATA); |
@@ -906,7 +906,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) | |||
906 | } | 906 | } |
907 | 907 | ||
908 | 908 | ||
909 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 909 | static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf) |
910 | { | 910 | { |
911 | WARN_ON (tf->protocol == ATA_PROT_DMA || | 911 | WARN_ON (tf->protocol == ATA_PROT_DMA || |
912 | tf->protocol == ATA_PROT_NODATA); | 912 | tf->protocol == ATA_PROT_NODATA); |
@@ -1013,7 +1013,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1013 | idx++; | 1013 | idx++; |
1014 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : | 1014 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : |
1015 | (long) (window_size - offset); | 1015 | (long) (window_size - offset); |
1016 | memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist); | 1016 | memcpy_toio(dimm_mmio + offset / 4, psource, dist); |
1017 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1017 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1018 | readl(mmio + PDC_GENERAL_CTLR); | 1018 | readl(mmio + PDC_GENERAL_CTLR); |
1019 | 1019 | ||
@@ -1022,8 +1022,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1022 | for (; (long) size >= (long) window_size ;) { | 1022 | for (; (long) size >= (long) window_size ;) { |
1023 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1023 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1024 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1024 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1025 | memcpy_toio((char *) (dimm_mmio), (char *) psource, | 1025 | memcpy_toio(dimm_mmio, psource, window_size / 4); |
1026 | window_size / 4); | ||
1027 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1026 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1028 | readl(mmio + PDC_GENERAL_CTLR); | 1027 | readl(mmio + PDC_GENERAL_CTLR); |
1029 | psource += window_size; | 1028 | psource += window_size; |
@@ -1034,7 +1033,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1034 | if (size) { | 1033 | if (size) { |
1035 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1034 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1036 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1035 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1037 | memcpy_toio((char *) (dimm_mmio), (char *) psource, size / 4); | 1036 | memcpy_toio(dimm_mmio, psource, size / 4); |
1038 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1037 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1039 | readl(mmio + PDC_GENERAL_CTLR); | 1038 | readl(mmio + PDC_GENERAL_CTLR); |
1040 | } | 1039 | } |