diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:30:16 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:30:16 -0400 |
commit | 15dbb5a3f971a28040ae6cbcd8bbdf19b629fa83 (patch) | |
tree | e65562d7300ac653207b1e45ec7e5960ddf78fff /drivers/scsi/sata_sx4.c | |
parent | be697c3f137c9ed808753bbbc5d7751c6e5303fc (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 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 | ||
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, |
@@ -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 | ||
903 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 903 | static 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 | ||
911 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf) | 911 | static 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 | } |