Add support for VT6415 PCIE PATA IDE Host Controller
[safe/jmp/linux-2.6] / drivers / ata / pata_at32.c
index d7b7b7f..ab61095 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
-#include <asm/arch/board.h>
-#include <asm/arch/smc.h>
+#include <mach/board.h>
+#include <mach/smc.h>
 
 #define DRV_NAME "pata_at32"
 #define DRV_VERSION "0.0.3"
@@ -171,28 +171,9 @@ static struct scsi_host_template at32_sht = {
 };
 
 static struct ata_port_operations at32_port_ops = {
-       .set_piomode            = pata_at32_set_piomode,
-       .tf_load                = ata_tf_load,
-       .tf_read                = ata_tf_read,
-       .exec_command           = ata_exec_command,
-       .check_status           = ata_check_status,
-       .dev_select             = ata_std_dev_select,
-
-       .freeze                 = ata_bmdma_freeze,
-       .thaw                   = ata_bmdma_thaw,
-       .error_handler          = ata_bmdma_error_handler,
-       .post_internal_cmd      = ata_bmdma_post_internal_cmd,
+       .inherits               = &ata_sff_port_ops,
        .cable_detect           = ata_cable_40wire,
-
-       .qc_prep                = ata_qc_prep,
-       .qc_issue               = ata_qc_issue_prot,
-
-       .data_xfer              = ata_data_xfer,
-
-       .irq_clear              = ata_noop_irq_clear,
-       .irq_on                 = ata_irq_on,
-
-       .port_start             = ata_sff_port_start,
+       .set_piomode            = pata_at32_set_piomode,
 };
 
 static int __init pata_at32_init_one(struct device *dev,
@@ -242,7 +223,7 @@ static int __init pata_at32_init_one(struct device *dev,
        host->private_data = info;
 
        /* Register ATA device and return */
-       return ata_host_activate(host, info->irq, ata_interrupt,
+       return ata_host_activate(host, info->irq, ata_sff_interrupt,
                                 IRQF_SHARED | IRQF_TRIGGER_RISING,
                                 &at32_sht);
 }
@@ -310,8 +291,6 @@ static int __init pata_at32_probe(struct platform_device *pdev)
        if (!info)
                return -ENOMEM;
 
-       memset(info, 0, sizeof(struct at32_ide_info));
-
        info->irq = irq;
        info->cs  = board->cs;
 
@@ -400,6 +379,9 @@ static int __exit pata_at32_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:at32_ide");
+
 static struct platform_driver pata_at32_driver = {
        .remove        = __exit_p(pata_at32_remove),
        .driver        = {