aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/atiixp.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/atiixp.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/atiixp.c')
-rw-r--r--drivers/ide/pci/atiixp.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index 91722f88b7bd..8b637181681a 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -130,35 +130,25 @@ static u8 __devinit atiixp_cable_detect(ide_hwif_t *hwif)
130 return ATA_CBL_PATA40; 130 return ATA_CBL_PATA40;
131} 131}
132 132
133/** 133static const struct ide_port_ops atiixp_port_ops = {
134 * init_hwif_atiixp - fill in the hwif for the ATIIXP 134 .set_pio_mode = atiixp_set_pio_mode,
135 * @hwif: IDE interface 135 .set_dma_mode = atiixp_set_dma_mode,
136 * 136 .cable_detect = atiixp_cable_detect,
137 * Set up the ide_hwif_t for the ATIIXP interface according to the 137};
138 * capabilities of the hardware.
139 */
140
141static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
142{
143 hwif->set_pio_mode = &atiixp_set_pio_mode;
144 hwif->set_dma_mode = &atiixp_set_dma_mode;
145
146 hwif->cable_detect = atiixp_cable_detect;
147}
148 138
149static const struct ide_port_info atiixp_pci_info[] __devinitdata = { 139static const struct ide_port_info atiixp_pci_info[] __devinitdata = {
150 { /* 0 */ 140 { /* 0 */
151 .name = "ATIIXP", 141 .name = "ATIIXP",
152 .init_hwif = init_hwif_atiixp,
153 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, 142 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
143 .port_ops = &atiixp_port_ops,
154 .host_flags = IDE_HFLAG_LEGACY_IRQS, 144 .host_flags = IDE_HFLAG_LEGACY_IRQS,
155 .pio_mask = ATA_PIO4, 145 .pio_mask = ATA_PIO4,
156 .mwdma_mask = ATA_MWDMA2, 146 .mwdma_mask = ATA_MWDMA2,
157 .udma_mask = ATA_UDMA5, 147 .udma_mask = ATA_UDMA5,
158 },{ /* 1 */ 148 },{ /* 1 */
159 .name = "SB600_PATA", 149 .name = "SB600_PATA",
160 .init_hwif = init_hwif_atiixp,
161 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, 150 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
151 .port_ops = &atiixp_port_ops,
162 .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS, 152 .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS,
163 .pio_mask = ATA_PIO4, 153 .pio_mask = ATA_PIO4,
164 .mwdma_mask = ATA_MWDMA2, 154 .mwdma_mask = ATA_MWDMA2,