]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_winbond.c
sata_mv: fix compilation error when enabling DEBUG
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_winbond.c
index d7555f775d5db139101ed2c6e5a016511938a7c9..311cdb3a5566caec1d60e788327f3004fc662b8d 100644 (file)
@@ -160,7 +160,7 @@ static struct ata_port_operations winbond_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 /**
@@ -197,6 +197,7 @@ static __init int winbond_init_one(unsigned long port)
 
        for (i = 0; i < 2 ; i ++) {
                unsigned long cmd_port = 0x1F0 - (0x80 * i);
+               unsigned long ctl_port = cmd_port + 0x206;
                struct ata_host *host;
                struct ata_port *ap;
                void __iomem *cmd_addr, *ctl_addr;
@@ -212,14 +213,16 @@ static __init int winbond_init_one(unsigned long port)
                host = ata_host_alloc(&pdev->dev, 1);
                if (!host)
                        goto err_unregister;
+               ap = host->ports[0];
 
                rc = -ENOMEM;
                cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8);
-               ctl_addr = devm_ioport_map(&pdev->dev, cmd_port + 0x0206, 1);
+               ctl_addr = devm_ioport_map(&pdev->dev, ctl_port, 1);
                if (!cmd_addr || !ctl_addr)
                        goto err_unregister;
 
-               ap = host->ports[0];
+               ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port);
+
                ap->ops = &winbond_port_ops;
                ap->pio_mask = 0x1F;
                ap->flags |= ATA_FLAG_SLAVE_POSS;
@@ -276,7 +279,7 @@ static __init int winbond_init(void)
 
                        if (request_region(port, 2, "pata_winbond")) {
                                ret = winbond_init_one(port);
-                               if(ret <= 0)
+                               if (ret <= 0)
                                        release_region(port, 2);
                                else ct+= ret;
                        }