Skip to content

Commit 29e52cf

Browse files
committed
ide: remove chipset field from hw_regs_t
* 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>
1 parent ca1b96e commit 29e52cf

24 files changed

Lines changed: 20 additions & 34 deletions

‎drivers/ide/at91_ide.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static const struct ide_port_info at91_ide_port_info __initdata = {
216216
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
217217
IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
218218
.pio_mask = ATA_PIO6,
219+
.chipset = ide_generic,
219220
};
220221

221222
/*
@@ -304,7 +305,6 @@ static int __init at91_ide_probe(struct platform_device *pdev)
304305
ide_std_init_ports(&hw, tf_base, ctl_base + 6);
305306

306307
hw.irq = board->irq_pin;
307-
hw.chipset = ide_generic;
308308
hw.dev = &pdev->dev;
309309

310310
host = ide_host_alloc(&at91_ide_port_info, hws);

‎drivers/ide/au1xxx-ide.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ static const struct ide_port_info au1xxx_port_info = {
499499
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
500500
.mwdma_mask = ATA_MWDMA2,
501501
#endif
502+
.chipset = ide_au1xxx,
502503
};
503504

504505
static int au_ide_probe(struct platform_device *dev)
@@ -548,7 +549,6 @@ static int au_ide_probe(struct platform_device *dev)
548549
auide_setup_ports(&hw, ahwif);
549550
hw.irq = ahwif->irq;
550551
hw.dev = &dev->dev;
551-
hw.chipset = ide_au1xxx;
552552

553553
ret = ide_host_add(&au1xxx_port_info, hws, &host);
554554
if (ret)

‎drivers/ide/buddha.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,
139139

140140
hw->irq = IRQ_AMIGA_PORTS;
141141
hw->ack_intr = ack_intr;
142-
143-
hw->chipset = ide_generic;
144142
}
145143

146144
static const struct ide_port_info buddha_port_info = {
147145
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
148146
.irq_flags = IRQF_SHARED,
147+
.chipset = ide_generic,
149148
};
150149

151150
/*

‎drivers/ide/cmd640.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,9 @@ static int __init cmd640x_init(void)
762762

763763
ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
764764
hw[0].irq = 14;
765-
hw[0].chipset = ide_cmd640;
766765

767766
ide_std_init_ports(&hw[1], 0x170, 0x376);
768767
hw[1].irq = 15;
769-
hw[1].chipset = ide_cmd640;
770768

771769
printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
772770
"\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);

‎drivers/ide/delkin_cb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static const struct ide_port_info delkin_cb_port_info = {
6868
IDE_HFLAG_NO_DMA,
6969
.irq_flags = IRQF_SHARED,
7070
.init_chipset = delkin_cb_init_chipset,
71+
.chipset = ide_pci,
7172
};
7273

7374
static int __devinit
@@ -97,7 +98,6 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
9798
ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
9899
hw.irq = dev->irq;
99100
hw.dev = &dev->dev;
100-
hw.chipset = ide_pci; /* this enables IRQ sharing */
101101

102102
rc = ide_host_add(&delkin_cb_port_info, hws, &host);
103103
if (rc)

‎drivers/ide/falconide.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ static const struct ide_port_info falconide_port_info = {
111111
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
112112
IDE_HFLAG_NO_DMA,
113113
.irq_flags = IRQF_SHARED,
114+
.chipset = ide_generic,
114115
};
115116

116117
static void __init falconide_setup_ports(hw_regs_t *hw)
@@ -128,8 +129,6 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
128129

129130
hw->irq = IRQ_MFP_IDE;
130131
hw->ack_intr = NULL;
131-
132-
hw->chipset = ide_generic;
133132
}
134133

135134
/*

‎drivers/ide/gayle.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,13 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
106106

107107
hw->irq = IRQ_AMIGA_PORTS;
108108
hw->ack_intr = ack_intr;
109-
110-
hw->chipset = ide_generic;
111109
}
112110

113111
static const struct ide_port_info gayle_port_info = {
114112
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
115113
IDE_HFLAG_NO_DMA,
116114
.irq_flags = IRQF_SHARED,
115+
.chipset = ide_generic,
117116
};
118117

119118
/*

‎drivers/ide/icside.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,
398398

399399
hw->irq = ec->irq;
400400
hw->dev = &ec->dev;
401-
hw->chipset = ide_acorn;
402401
}
403402

404403
static const struct ide_port_info icside_v5_port_info = {
405404
.host_flags = IDE_HFLAG_NO_DMA,
405+
.chipset = ide_acorn,
406406
};
407407

408408
static int __devinit
@@ -457,6 +457,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
457457
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
458458
.mwdma_mask = ATA_MWDMA2,
459459
.swdma_mask = ATA_SWDMA2,
460+
.chipset = ide_acorn,
460461
};
461462

462463
static int __devinit

‎drivers/ide/ide-4drives.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static const struct ide_port_info ide_4drives_port_info = {
2525
.port_ops = &ide_4drives_port_ops,
2626
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_DMA |
2727
IDE_HFLAG_4DRIVES,
28+
.chipset = ide_4drives,
2829
};
2930

3031
static int __init ide_4drives_init(void)
@@ -52,7 +53,6 @@ static int __init ide_4drives_init(void)
5253

5354
ide_std_init_ports(&hw, base, ctl);
5455
hw.irq = 14;
55-
hw.chipset = ide_4drives;
5656

5757
return ide_host_add(&ide_4drives_port_info, hws, NULL);
5858
}

‎drivers/ide/ide-cs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ static const struct ide_port_info idecs_port_info = {
155155
.port_ops = &idecs_port_ops,
156156
.host_flags = IDE_HFLAG_NO_DMA,
157157
.irq_flags = IRQF_SHARED,
158+
.chipset = ide_pci,
158159
};
159160

160161
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,
181182
memset(&hw, 0, sizeof(hw));
182183
ide_std_init_ports(&hw, io, ctl);
183184
hw.irq = irq;
184-
hw.chipset = ide_pci;
185185
hw.dev = &handle->dev;
186186

187187
rc = ide_host_add(&idecs_port_info, hws, &host);

0 commit comments

Comments
 (0)