aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sl82c105.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:14 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:14 -0400
commitac95beedf8bc97b24f9540d4da9952f07221c023 (patch)
treec29837142c8083b6fcaf1767abcb0a4533676cd1 /drivers/ide/pci/sl82c105.c
parent4a27214d7be31e122db4102166f49ec15958e8e9 (diff)
ide: add struct ide_port_ops (take 2)
* Move hooks for port/host specific methods from ide_hwif_t to 'struct ide_port_ops'. * Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info' and ide_hwif_t. * Update host drivers and core code accordingly. While at it: * Rename ata66_*() cable detect functions to *_cable_detect() to match the standard naming. (Suggested by Sergei Shtylyov) v2: * Fix build for bast-ide. (Noticed by Andrew Morton) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/sl82c105.c')
-rw-r--r--drivers/ide/pci/sl82c105.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 40b3eeb2d847..66817fe1eeae 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -292,10 +292,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
292 292
293 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index)); 293 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index));
294 294
295 hwif->set_pio_mode = &sl82c105_set_pio_mode;
296 hwif->set_dma_mode = &sl82c105_set_dma_mode;
297 hwif->resetproc = &sl82c105_resetproc;
298
299 if (!hwif->dma_base) 295 if (!hwif->dma_base)
300 return; 296 return;
301 297
@@ -321,11 +317,18 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
321 hwif->serialized = hwif->mate->serialized = 1; 317 hwif->serialized = hwif->mate->serialized = 1;
322} 318}
323 319
320static const struct ide_port_ops sl82c105_port_ops = {
321 .set_pio_mode = sl82c105_set_pio_mode,
322 .set_dma_mode = sl82c105_set_dma_mode,
323 .resetproc = sl82c105_resetproc,
324};
325
324static const struct ide_port_info sl82c105_chipset __devinitdata = { 326static const struct ide_port_info sl82c105_chipset __devinitdata = {
325 .name = "W82C105", 327 .name = "W82C105",
326 .init_chipset = init_chipset_sl82c105, 328 .init_chipset = init_chipset_sl82c105,
327 .init_hwif = init_hwif_sl82c105, 329 .init_hwif = init_hwif_sl82c105,
328 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 330 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
331 .port_ops = &sl82c105_port_ops,
329 .host_flags = IDE_HFLAG_IO_32BIT | 332 .host_flags = IDE_HFLAG_IO_32BIT |
330 IDE_HFLAG_UNMASK_IRQS | 333 IDE_HFLAG_UNMASK_IRQS |
331/* FIXME: check for Compatibility mode in generic IDE PCI code */ 334/* FIXME: check for Compatibility mode in generic IDE PCI code */