diff options
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r-- | drivers/ata/sata_fsl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 61c89b54ea23..7325f77480dc 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -1096,7 +1096,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1096 | { | 1096 | { |
1097 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 1097 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
1098 | void __iomem *hcr_base = host_priv->hcr_base; | 1098 | void __iomem *hcr_base = host_priv->hcr_base; |
1099 | u32 hstatus, qc_active = 0; | 1099 | u32 hstatus, done_mask = 0; |
1100 | struct ata_queued_cmd *qc; | 1100 | struct ata_queued_cmd *qc; |
1101 | u32 SError; | 1101 | u32 SError; |
1102 | 1102 | ||
@@ -1116,28 +1116,28 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* Read command completed register */ | 1118 | /* Read command completed register */ |
1119 | qc_active = ioread32(hcr_base + CC); | 1119 | done_mask = ioread32(hcr_base + CC); |
1120 | 1120 | ||
1121 | VPRINTK("Status of all queues :\n"); | 1121 | VPRINTK("Status of all queues :\n"); |
1122 | VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", | 1122 | VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", |
1123 | qc_active, | 1123 | done_mask, |
1124 | ioread32(hcr_base + CA), | 1124 | ioread32(hcr_base + CA), |
1125 | ioread32(hcr_base + CE), | 1125 | ioread32(hcr_base + CE), |
1126 | ioread32(hcr_base + CQ), | 1126 | ioread32(hcr_base + CQ), |
1127 | ap->qc_active); | 1127 | ap->qc_active); |
1128 | 1128 | ||
1129 | if (qc_active & ap->qc_active) { | 1129 | if (done_mask & ap->qc_active) { |
1130 | int i; | 1130 | int i; |
1131 | /* clear CC bit, this will also complete the interrupt */ | 1131 | /* clear CC bit, this will also complete the interrupt */ |
1132 | iowrite32(qc_active, hcr_base + CC); | 1132 | iowrite32(done_mask, hcr_base + CC); |
1133 | 1133 | ||
1134 | DPRINTK("Status of all queues :\n"); | 1134 | DPRINTK("Status of all queues :\n"); |
1135 | DPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x\n", | 1135 | DPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x\n", |
1136 | qc_active, ioread32(hcr_base + CA), | 1136 | done_mask, ioread32(hcr_base + CA), |
1137 | ioread32(hcr_base + CE)); | 1137 | ioread32(hcr_base + CE)); |
1138 | 1138 | ||
1139 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { | 1139 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { |
1140 | if (qc_active & (1 << i)) { | 1140 | if (done_mask & (1 << i)) { |
1141 | qc = ata_qc_from_tag(ap, i); | 1141 | qc = ata_qc_from_tag(ap, i); |
1142 | if (qc) { | 1142 | if (qc) { |
1143 | ata_qc_complete(qc); | 1143 | ata_qc_complete(qc); |
@@ -1164,7 +1164,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1164 | /* Spurious Interrupt!! */ | 1164 | /* Spurious Interrupt!! */ |
1165 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", | 1165 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", |
1166 | ioread32(hcr_base + CC)); | 1166 | ioread32(hcr_base + CC)); |
1167 | iowrite32(qc_active, hcr_base + CC); | 1167 | iowrite32(done_mask, hcr_base + CC); |
1168 | return; | 1168 | return; |
1169 | } | 1169 | } |
1170 | } | 1170 | } |
@@ -1296,7 +1296,7 @@ static const struct ata_port_info sata_fsl_port_info[] = { | |||
1296 | }, | 1296 | }, |
1297 | }; | 1297 | }; |
1298 | 1298 | ||
1299 | static int sata_fsl_probe(struct of_device *ofdev, | 1299 | static int sata_fsl_probe(struct platform_device *ofdev, |
1300 | const struct of_device_id *match) | 1300 | const struct of_device_id *match) |
1301 | { | 1301 | { |
1302 | int retval = -ENXIO; | 1302 | int retval = -ENXIO; |
@@ -1370,7 +1370,7 @@ error_exit_with_cleanup: | |||
1370 | return retval; | 1370 | return retval; |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | static int sata_fsl_remove(struct of_device *ofdev) | 1373 | static int sata_fsl_remove(struct platform_device *ofdev) |
1374 | { | 1374 | { |
1375 | struct ata_host *host = dev_get_drvdata(&ofdev->dev); | 1375 | struct ata_host *host = dev_get_drvdata(&ofdev->dev); |
1376 | struct sata_fsl_host_priv *host_priv = host->private_data; | 1376 | struct sata_fsl_host_priv *host_priv = host->private_data; |
@@ -1387,13 +1387,13 @@ static int sata_fsl_remove(struct of_device *ofdev) | |||
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | #ifdef CONFIG_PM | 1389 | #ifdef CONFIG_PM |
1390 | static int sata_fsl_suspend(struct of_device *op, pm_message_t state) | 1390 | static int sata_fsl_suspend(struct platform_device *op, pm_message_t state) |
1391 | { | 1391 | { |
1392 | struct ata_host *host = dev_get_drvdata(&op->dev); | 1392 | struct ata_host *host = dev_get_drvdata(&op->dev); |
1393 | return ata_host_suspend(host, state); | 1393 | return ata_host_suspend(host, state); |
1394 | } | 1394 | } |
1395 | 1395 | ||
1396 | static int sata_fsl_resume(struct of_device *op) | 1396 | static int sata_fsl_resume(struct platform_device *op) |
1397 | { | 1397 | { |
1398 | struct ata_host *host = dev_get_drvdata(&op->dev); | 1398 | struct ata_host *host = dev_get_drvdata(&op->dev); |
1399 | struct sata_fsl_host_priv *host_priv = host->private_data; | 1399 | struct sata_fsl_host_priv *host_priv = host->private_data; |