]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ide/sgiioc4.c
ide: remove hw_regs_t typedef
[mv-sheeva.git] / drivers / ide / sgiioc4.c
index cb2657c4c9767a3823ea384626a5bea2e3b3c82f..5f37f168f94446c0403a676c0ed0ba7e91b0514b 100644 (file)
@@ -91,7 +91,7 @@ typedef struct {
 
 
 static void
-sgiioc4_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
+sgiioc4_init_hwif_ports(struct ide_hw *hw, unsigned long data_port,
                        unsigned long ctrl_port, unsigned long irq_port)
 {
        unsigned long reg = data_port;
@@ -277,11 +277,12 @@ static void sgiioc4_dma_host_set(ide_drive_t *drive, int on)
                sgiioc4_clearirq(drive);
 }
 
-static void
-sgiioc4_resetproc(ide_drive_t * drive)
+static void sgiioc4_resetproc(ide_drive_t *drive)
 {
+       struct ide_cmd *cmd = &drive->hwif->cmd;
+
        sgiioc4_dma_end(drive);
-       ide_destroy_dmatable(drive);
+       ide_dma_unmap_sg(drive, cmd);
        sgiioc4_clearirq(drive);
 }
 
@@ -502,9 +503,9 @@ static const struct ide_tp_ops sgiioc4_tp_ops = {
        .exec_command           = ide_exec_command,
        .read_status            = sgiioc4_read_status,
        .read_altstatus         = ide_read_altstatus,
+       .write_devctl           = ide_write_devctl,
 
-       .set_irq                = ide_set_irq,
-
+       .dev_select             = ide_dev_select,
        .tf_load                = ide_tf_load,
        .tf_read                = ide_tf_read,
 
@@ -545,7 +546,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
        unsigned long cmd_base, irqport;
        unsigned long bar0, cmd_phys_base, ctl;
        void __iomem *virt_base;
-       hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
+       struct ide_hw hw, *hws[] = { &hw };
        int rc;
 
        /*  Get the CmdBlk and CtrlBlk Base Registers */
@@ -574,13 +575,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
        memset(&hw, 0, sizeof(hw));
        sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
        hw.irq = dev->irq;
-       hw.chipset = ide_pci;
        hw.dev = &dev->dev;
 
        /* Initializing chipset IRQ Registers */
        writel(0x03, (void __iomem *)(irqport + IOC4_INTR_SET * 4));
 
-       rc = ide_host_add(&sgiioc4_port_info, hws, NULL);
+       rc = ide_host_add(&sgiioc4_port_info, hws, 1, NULL);
        if (!rc)
                return 0;