]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ide: remove chipset field from hw_regs_t
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 17 May 2009 17:12:22 +0000 (19:12 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 17 May 2009 17:12:22 +0000 (19:12 +0200)
* Convert host drivers that still use hw_regs_t's chipset field to use
  the one in struct ide_port_info instead.

* Move special handling of ide_pci chipset type from ide_hw_configure()
  to ide_init_port().

* Remove chipset field from hw_regs_t.

While at it:
- remove stale comment in delkin_cb.c

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
24 files changed:
drivers/ide/at91_ide.c
drivers/ide/au1xxx-ide.c
drivers/ide/buddha.c
drivers/ide/cmd640.c
drivers/ide/delkin_cb.c
drivers/ide/falconide.c
drivers/ide/gayle.c
drivers/ide/icside.c
drivers/ide/ide-4drives.c
drivers/ide/ide-cs.c
drivers/ide/ide-generic.c
drivers/ide/ide-h8300.c
drivers/ide/ide-legacy.c
drivers/ide/ide-pnp.c
drivers/ide/ide-probe.c
drivers/ide/ide_platform.c
drivers/ide/macide.c
drivers/ide/palm_bk3710.c
drivers/ide/q40ide.c
drivers/ide/rapide.c
drivers/ide/scc_pata.c
drivers/ide/setup-pci.c
drivers/ide/sgiioc4.c
include/linux/ide.h

index 403d0e4265db1ef9d9163229fae6568a66d032ac..8d39cc9bdf92222521f1c2076952523845290dc0 100644 (file)
@@ -216,6 +216,7 @@ static const struct ide_port_info at91_ide_port_info __initdata = {
        .host_flags     = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
                          IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
        .pio_mask       = ATA_PIO6,
+       .chipset        = ide_generic,
 };
 
 /*
@@ -304,7 +305,6 @@ static int __init at91_ide_probe(struct platform_device *pdev)
                ide_std_init_ports(&hw, tf_base, ctl_base + 6);
 
        hw.irq = board->irq_pin;
-       hw.chipset = ide_generic;
        hw.dev = &pdev->dev;
 
        host = ide_host_alloc(&at91_ide_port_info, hws);
index 46013644c965c1638faf8f519cd1578a177d114d..9b31f830e2f5bf9d4c8e55ce02d54b3ec40ccea3 100644 (file)
@@ -499,6 +499,7 @@ static const struct ide_port_info au1xxx_port_info = {
 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
        .mwdma_mask             = ATA_MWDMA2,
 #endif
+       .chipset                = ide_au1xxx,
 };
 
 static int au_ide_probe(struct platform_device *dev)
@@ -548,7 +549,6 @@ static int au_ide_probe(struct platform_device *dev)
        auide_setup_ports(&hw, ahwif);
        hw.irq = ahwif->irq;
        hw.dev = &dev->dev;
-       hw.chipset = ide_au1xxx;
 
        ret = ide_host_add(&au1xxx_port_info, hws, &host);
        if (ret)
index d028f8864bc14f7324f24c25abc02c4258f98bb7..9aa2cd9be310ace796521201a12d2d4f053c2af5 100644 (file)
@@ -139,13 +139,12 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,
 
        hw->irq = IRQ_AMIGA_PORTS;
        hw->ack_intr = ack_intr;
-
-       hw->chipset = ide_generic;
 }
 
 static const struct ide_port_info buddha_port_info = {
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_generic,
 };
 
     /*
index 8890276fef7fbfaa3d163c9c9856421e025d11ee..e862a2503ab0a9ff1a56be319f45e2b0da60e253 100644 (file)
@@ -762,11 +762,9 @@ static int __init cmd640x_init(void)
 
        ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
        hw[0].irq = 14;
-       hw[0].chipset = ide_cmd640;
 
        ide_std_init_ports(&hw[1], 0x170, 0x376);
        hw[1].irq = 15;
-       hw[1].chipset = ide_cmd640;
 
        printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
                         "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);
index f153b95619bb372e958f7c51c8ca1dcd1ccf043a..a0de834a81c3fa796418a4c338459bb293ff2422 100644 (file)
@@ -68,6 +68,7 @@ static const struct ide_port_info delkin_cb_port_info = {
                                  IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
        .init_chipset           = delkin_cb_init_chipset,
+       .chipset                = ide_pci,
 };
 
 static int __devinit
@@ -97,7 +98,6 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
        ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
        hw.irq = dev->irq;
        hw.dev = &dev->dev;
-       hw.chipset = ide_pci;           /* this enables IRQ sharing */
 
        rc = ide_host_add(&delkin_cb_port_info, hws, &host);
        if (rc)
index 0e2df6755ec9f3b45d540fe85b2ef999efd058ac..770cfa67bdc8527c8a25a486b8f740e9ef241fcf 100644 (file)
@@ -111,6 +111,7 @@ static const struct ide_port_info falconide_port_info = {
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
                                  IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_generic,
 };
 
 static void __init falconide_setup_ports(hw_regs_t *hw)
@@ -128,8 +129,6 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
 
        hw->irq = IRQ_MFP_IDE;
        hw->ack_intr = NULL;
-
-       hw->chipset = ide_generic;
 }
 
     /*
index c7119516c5a7ccaff6029fbacc3e3a7dfe1017ec..71db2f9c336196b3d3e931d37778b9d2d7bed84d 100644 (file)
@@ -106,14 +106,13 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
 
        hw->irq = IRQ_AMIGA_PORTS;
        hw->ack_intr = ack_intr;
-
-       hw->chipset = ide_generic;
 }
 
 static const struct ide_port_info gayle_port_info = {
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
                                  IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_generic,
 };
 
     /*
index 36da913cc5532051ebbfc4ef260986238f60cbc0..6352a44ed17920cdca5b5ef150eb4237daf2f1ec 100644 (file)
@@ -398,11 +398,11 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,
 
        hw->irq = ec->irq;
        hw->dev = &ec->dev;
-       hw->chipset = ide_acorn;
 }
 
 static const struct ide_port_info icside_v5_port_info = {
        .host_flags             = IDE_HFLAG_NO_DMA,
+       .chipset                = ide_acorn,
 };
 
 static int __devinit
@@ -457,6 +457,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
        .host_flags             = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
        .mwdma_mask             = ATA_MWDMA2,
        .swdma_mask             = ATA_SWDMA2,
+       .chipset                = ide_acorn,
 };
 
 static int __devinit
index 78aca75a2c487ece474e08bcb220c5542caa8b4b..617ca7a5ec8a9acee24c9b9c7c8e20efeada5299 100644 (file)
@@ -25,6 +25,7 @@ static const struct ide_port_info ide_4drives_port_info = {
        .port_ops               = &ide_4drives_port_ops,
        .host_flags             = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA |
                                  IDE_HFLAG_4DRIVES,
+       .chipset                = ide_4drives,
 };
 
 static int __init ide_4drives_init(void)
@@ -52,7 +53,6 @@ static int __init ide_4drives_init(void)
 
        ide_std_init_ports(&hw, base, ctl);
        hw.irq = 14;
-       hw.chipset = ide_4drives;
 
        return ide_host_add(&ide_4drives_port_info, hws, NULL);
 }
index 9e47f3529d5555685bb829b1e92b7b621c15e624..43d09dcae28cd720413b63b055fd82b1e1dc0382 100644 (file)
@@ -155,6 +155,7 @@ static const struct ide_port_info idecs_port_info = {
        .port_ops               = &idecs_port_ops,
        .host_flags             = IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_pci,
 };
 
 static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
@@ -181,7 +182,6 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
     memset(&hw, 0, sizeof(hw));
     ide_std_init_ports(&hw, io, ctl);
     hw.irq = irq;
-    hw.chipset = ide_pci;
     hw.dev = &handle->dev;
 
     rc = ide_host_add(&idecs_port_info, hws, &host);
index 7812ca0be13beb1c5af1ba98ea8b29b4bd2cbf4b..0427759d01877719e999d82b57fe79b8bab84696 100644 (file)
@@ -29,6 +29,7 @@ MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
 
 static const struct ide_port_info ide_generic_port_info = {
        .host_flags             = IDE_HFLAG_NO_DMA,
+       .chipset                = ide_generic,
 };
 
 #ifdef CONFIG_ARM
@@ -132,8 +133,6 @@ static int __init ide_generic_init(void)
 #else
                        hw.irq = legacy_irqs[i];
 #endif
-                       hw.chipset = ide_generic;
-
                        rc = ide_host_add(&ide_generic_port_info, hws, NULL);
                        if (rc) {
                                release_region(io_addr + 0x206, 1);
index c06ebdc4a130b9c609d2074748fdcf0e0077b651..40eff6c9759cceb9b75ff1e47dd6eac0a1b1f512 100644 (file)
@@ -73,12 +73,12 @@ static inline void hw_setup(hw_regs_t *hw)
                hw->io_ports_array[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i;
        hw->io_ports.ctl_addr = CONFIG_H8300_IDE_ALT;
        hw->irq = EXT_IRQ0 + CONFIG_H8300_IDE_IRQ;
-       hw->chipset = ide_generic;
 }
 
 static const struct ide_port_info h8300_port_info = {
        .tp_ops                 = &h8300_tp_ops,
        .host_flags             = IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_DMA,
+       .chipset                = ide_generic,
 };
 
 static int __init h8300_ide_init(void)
index 8c5dcbf22547a23d0eca965fd573340ca50e06d8..0c5b29c56cbec9768f6076907ce2b2d2ee28d85e 100644 (file)
@@ -33,7 +33,6 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw,
 
        ide_std_init_ports(hw, base, ctl);
        hw->irq = irq;
-       hw->chipset = d->chipset;
        hw->config = config;
 
        hws[port_no] = hw;
index 6e80b774e88a8fb538c08d98298775eb3514eee0..47043fda2398e5d142cc8c9f05b003906fd03882 100644 (file)
@@ -29,6 +29,7 @@ static struct pnp_device_id idepnp_devices[] = {
 
 static const struct ide_port_info ide_pnp_port_info = {
        .host_flags             = IDE_HFLAG_NO_DMA,
+       .chipset                = ide_generic,
 };
 
 static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
@@ -62,7 +63,6 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
        memset(&hw, 0, sizeof(hw));
        ide_std_init_ports(&hw, base, ctl);
        hw.irq = pnp_irq(dev, 0);
-       hw.chipset = ide_generic;
 
        rc = ide_host_add(&ide_pnp_port_info, hws, &host);
        if (rc)
index 727a67109ff021ea92a993d757f093a1f92ce63d..f17ba1932ad64f58cef5df14ea600be16ff43baf 100644 (file)
@@ -1048,8 +1048,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
 {
        hwif->channel = port;
 
-       if (d->chipset)
-               hwif->chipset = d->chipset;
+       hwif->chipset = d->chipset ? d->chipset : ide_pci;
 
        if (d->init_iops)
                d->init_iops(hwif);
@@ -1178,7 +1177,6 @@ static void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw)
 {
        memcpy(&hwif->io_ports, &hw->io_ports, sizeof(hwif->io_ports));
        hwif->irq = hw->irq;
-       hwif->chipset = hw->chipset;
        hwif->dev = hw->dev;
        hwif->gendev.parent = hw->parent ? hw->parent : hw->dev;
        hwif->ack_intr = hw->ack_intr;
index 051b4ab0f359d033745e0a035235a656dea7be4e..813653362a26238180a59d448c89b8beba234489 100644 (file)
@@ -40,12 +40,11 @@ static void __devinit plat_ide_setup_ports(hw_regs_t *hw,
        hw->io_ports.ctl_addr = (unsigned long)ctrl;
 
        hw->irq = irq;
-
-       hw->chipset = ide_generic;
 }
 
 static const struct ide_port_info platform_ide_port_info = {
        .host_flags             = IDE_HFLAG_NO_DMA,
+       .chipset                = ide_generic,
 };
 
 static int __devinit plat_ide_probe(struct platform_device *pdev)
index 4b1718e832839186c12673f8b589022ba115c55a..3af9e96da61720229bcebb1bacf07d9f3a71632b 100644 (file)
@@ -76,13 +76,12 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base,
 
        hw->irq = irq;
        hw->ack_intr = ack_intr;
-
-       hw->chipset = ide_generic;
 }
 
 static const struct ide_port_info macide_port_info = {
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_generic,
 };
 
 static const char *mac_ide_name[] =
index 09d813d313f4a44986a2f358d8ddc08c619533f1..a455c25f43cc6d42bf1396057ae80dcf881ebb56 100644 (file)
@@ -306,6 +306,7 @@ static struct ide_port_info __devinitdata palm_bk3710_port_info = {
        .host_flags             = IDE_HFLAG_MMIO,
        .pio_mask               = ATA_PIO4,
        .mwdma_mask             = ATA_MWDMA2,
+       .chipset                = ide_palm3710,
 };
 
 static int __init palm_bk3710_probe(struct platform_device *pdev)
@@ -363,7 +364,6 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
                        (base + IDE_PALM_ATA_PRI_CTL_OFFSET);
        hw.irq = irq->start;
        hw.dev = &pdev->dev;
-       hw.chipset = ide_palm3710;
 
        palm_bk3710_port_info.udma_mask = rate < 100000000 ? ATA_UDMA4 :
                                                             ATA_UDMA5;
index c79346679244228e5671570bea1d335b02cf78c9..7488d4ff3d7cc45242d69ad3ad2412adc041d851 100644 (file)
@@ -70,8 +70,6 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base,
 
        hw->irq = irq;
        hw->ack_intr = ack_intr;
-
-       hw->chipset = ide_generic;
 }
 
 static void q40ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
@@ -119,6 +117,7 @@ static const struct ide_port_info q40ide_port_info = {
        .tp_ops                 = &q40ide_tp_ops,
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
        .irq_flags              = IRQF_SHARED,
+       .chipset                = ide_generic,
 };
 
 /* 
index d5003ca69801684bdc71e65db78767a41445c42e..bd4d7a8a666c59377814fc6f80770e924e1dbf36 100644 (file)
@@ -13,6 +13,7 @@
 
 static const struct ide_port_info rapide_port_info = {
        .host_flags             = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
+       .chipset                = ide_generic,
 };
 
 static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base,
@@ -49,7 +50,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
 
        memset(&hw, 0, sizeof(hw));
        rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq);
-       hw.chipset = ide_generic;
        hw.dev = &ec->dev;
 
        ret = ide_host_add(&rapide_port_info, hws, &host);
index 5be41f25204f627e775aa4a962febf98a1cdb560..9e3aef317332a3b24595a4f08b929696147765e4 100644 (file)
@@ -567,7 +567,6 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
                hw.io_ports_array[i] = ports->dma + 0x20 + i * 4;
        hw.irq = dev->irq;
        hw.dev = &dev->dev;
-       hw.chipset = ide_pci;
 
        rc = ide_host_add(d, hws, &host);
        if (rc)
@@ -823,6 +822,7 @@ static const struct ide_port_info scc_chipset __devinitdata = {
        .host_flags     = IDE_HFLAG_SINGLE,
        .irq_flags      = IRQF_SHARED,
        .pio_mask       = ATA_PIO4,
+       .chipset        = ide_pci,
 };
 
 /**
index 7a3a12d6e638eae21a9bbce4f3f269d55b5a8aa6..82519ddc9108ddb0d4a2f2a4779c0a72cb2b0809 100644 (file)
@@ -344,7 +344,6 @@ static int ide_hw_configure(struct pci_dev *dev, const struct ide_port_info *d,
 
        memset(hw, 0, sizeof(*hw));
        hw->dev = &dev->dev;
-       hw->chipset = d->chipset ? d->chipset : ide_pci;
        ide_std_init_ports(hw, base, ctl | 2);
 
        return 0;
index e5d2a48a84de9314133d2b54c49f63aa08f536e4..676d41c7add5b2526ea03d88042688c9b6ac0ec3 100644 (file)
@@ -575,7 +575,6 @@ 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 */
index fc61328a4cdbd28edac445961e76f3529feb5132..9652edbd26af75eb07ce027be14a8fcb818c9e5c 100644 (file)
@@ -186,7 +186,6 @@ typedef struct hw_regs_s {
 
        int             irq;                    /* our irq number */
        ide_ack_intr_t  *ack_intr;              /* acknowledge interrupt */
-       hwif_chipset_t  chipset;
        struct device   *dev, *parent;
        unsigned long   config;
 } hw_regs_t;