]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/sata_fsl.c
Merge branch 'x86-alternatives-for-linus' of git://git.kernel.org/pub/scm/linux/kerne...
[karo-tx-linux.git] / drivers / ata / sata_fsl.c
index a69192b38b438411cf4b8e839cbe32dfcd357f6c..18c986dbb7f145cbd04399e313029d71dae3a459 100644 (file)
@@ -1096,7 +1096,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
 {
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
-       u32 hstatus, qc_active = 0;
+       u32 hstatus, done_mask = 0;
        struct ata_queued_cmd *qc;
        u32 SError;
 
@@ -1116,28 +1116,28 @@ static void sata_fsl_host_intr(struct ata_port *ap)
        }
 
        /* Read command completed register */
-       qc_active = ioread32(hcr_base + CC);
+       done_mask = ioread32(hcr_base + CC);
 
        VPRINTK("Status of all queues :\n");
-       VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
-               qc_active,
+       VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
+               done_mask,
                ioread32(hcr_base + CA),
                ioread32(hcr_base + CE),
                ioread32(hcr_base + CQ),
                ap->qc_active);
 
-       if (qc_active & ap->qc_active) {
+       if (done_mask & ap->qc_active) {
                int i;
                /* clear CC bit, this will also complete the interrupt */
-               iowrite32(qc_active, hcr_base + CC);
+               iowrite32(done_mask, hcr_base + CC);
 
                DPRINTK("Status of all queues :\n");
-               DPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
-                       qc_active, ioread32(hcr_base + CA),
+               DPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
+                       done_mask, ioread32(hcr_base + CA),
                        ioread32(hcr_base + CE));
 
                for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) {
-                       if (qc_active & (1 << i)) {
+                       if (done_mask & (1 << i)) {
                                qc = ata_qc_from_tag(ap, i);
                                if (qc) {
                                        ata_qc_complete(qc);
@@ -1164,7 +1164,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
                /* Spurious Interrupt!! */
                DPRINTK("spurious interrupt!!, CC = 0x%x\n",
                        ioread32(hcr_base + CC));
-               iowrite32(qc_active, hcr_base + CC);
+               iowrite32(done_mask, hcr_base + CC);
                return;
        }
 }
@@ -1313,7 +1313,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
        dev_printk(KERN_INFO, &ofdev->dev,
                   "Sata FSL Platform/CSB Driver init\n");
 
-       hcr_base = of_iomap(ofdev->node, 0);
+       hcr_base = of_iomap(ofdev->dev.of_node, 0);
        if (!hcr_base)
                goto error_exit_with_cleanup;
 
@@ -1332,7 +1332,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
        host_priv->ssr_base = ssr_base;
        host_priv->csr_base = csr_base;
 
-       irq = irq_of_parse_and_map(ofdev->node, 0);
+       irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
        if (irq < 0) {
                dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
                goto error_exit_with_cleanup;
@@ -1427,8 +1427,11 @@ static struct of_device_id fsl_sata_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_sata_match);
 
 static struct of_platform_driver fsl_sata_driver = {
-       .name           = "fsl-sata",
-       .match_table    = fsl_sata_match,
+       .driver = {
+               .name = "fsl-sata",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_sata_match,
+       },
        .probe          = sata_fsl_probe,
        .remove         = sata_fsl_remove,
 #ifdef CONFIG_PM