diff options
Diffstat (limited to 'drivers/ide/legacy/dtc2278.c')
-rw-r--r-- | drivers/ide/legacy/dtc2278.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index 611c9705a3ae..73396f70f2b7 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
@@ -84,14 +84,20 @@ static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
84 | /* Actually we do - there is a data sheet available for the | 84 | /* Actually we do - there is a data sheet available for the |
85 | Winbond but does anyone actually care */ | 85 | Winbond but does anyone actually care */ |
86 | } | 86 | } |
87 | |||
88 | /* | ||
89 | * 32bit I/O has to be enabled for *both* drives at the same time. | ||
90 | */ | ||
91 | drive->io_32bit = 1; | ||
92 | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1; | ||
93 | } | 87 | } |
94 | 88 | ||
89 | static const struct ide_port_info dtc2278_port_info __initdata = { | ||
90 | .chipset = ide_dtc2278, | ||
91 | .host_flags = IDE_HFLAG_SERIALIZE | | ||
92 | IDE_HFLAG_NO_UNMASK_IRQS | | ||
93 | IDE_HFLAG_IO_32BIT | | ||
94 | /* disallow ->io_32bit changes */ | ||
95 | IDE_HFLAG_NO_IO_32BIT | | ||
96 | IDE_HFLAG_NO_DMA | | ||
97 | IDE_HFLAG_NO_AUTOTUNE, | ||
98 | .pio_mask = ATA_PIO4, | ||
99 | }; | ||
100 | |||
95 | static int __init dtc2278_probe(void) | 101 | static int __init dtc2278_probe(void) |
96 | { | 102 | { |
97 | unsigned long flags; | 103 | unsigned long flags; |
@@ -122,23 +128,9 @@ static int __init dtc2278_probe(void) | |||
122 | #endif | 128 | #endif |
123 | local_irq_restore(flags); | 129 | local_irq_restore(flags); |
124 | 130 | ||
125 | hwif->serialized = 1; | ||
126 | hwif->chipset = ide_dtc2278; | ||
127 | hwif->pio_mask = ATA_PIO4; | ||
128 | hwif->set_pio_mode = &dtc2278_set_pio_mode; | 131 | hwif->set_pio_mode = &dtc2278_set_pio_mode; |
129 | hwif->drives[0].no_unmask = 1; | 132 | |
130 | hwif->drives[1].no_unmask = 1; | 133 | ide_device_add(idx, &dtc2278_port_info); |
131 | hwif->mate = mate; | ||
132 | |||
133 | mate->serialized = 1; | ||
134 | mate->chipset = ide_dtc2278; | ||
135 | mate->pio_mask = ATA_PIO4; | ||
136 | mate->drives[0].no_unmask = 1; | ||
137 | mate->drives[1].no_unmask = 1; | ||
138 | mate->mate = hwif; | ||
139 | mate->channel = 1; | ||
140 | |||
141 | ide_device_add(idx); | ||
142 | 134 | ||
143 | return 0; | 135 | return 0; |
144 | } | 136 | } |