diff options
Diffstat (limited to 'drivers/ide/legacy/ht6560b.c')
-rw-r--r-- | drivers/ide/legacy/ht6560b.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index a89cd80d8124..02d12c74764a 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -300,6 +300,18 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
300 | #endif | 300 | #endif |
301 | } | 301 | } |
302 | 302 | ||
303 | static void __init ht6560b_port_init_devs(ide_hwif_t *hwif) | ||
304 | { | ||
305 | /* Setting default configurations for drives. */ | ||
306 | int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT; | ||
307 | |||
308 | if (hwif->channel) | ||
309 | t |= (HT_SECONDARY_IF << 8); | ||
310 | |||
311 | hwif->drives[0].drive_data = t; | ||
312 | hwif->drives[1].drive_data = t; | ||
313 | } | ||
314 | |||
303 | int probe_ht6560b = 0; | 315 | int probe_ht6560b = 0; |
304 | 316 | ||
305 | module_param_named(probe, probe_ht6560b, bool, 0); | 317 | module_param_named(probe, probe_ht6560b, bool, 0); |
@@ -318,7 +330,6 @@ static int __init ht6560b_init(void) | |||
318 | { | 330 | { |
319 | ide_hwif_t *hwif, *mate; | 331 | ide_hwif_t *hwif, *mate; |
320 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; | 332 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; |
321 | int t; | ||
322 | 333 | ||
323 | if (probe_ht6560b == 0) | 334 | if (probe_ht6560b == 0) |
324 | return -ENODEV; | 335 | return -ENODEV; |
@@ -343,17 +354,8 @@ static int __init ht6560b_init(void) | |||
343 | mate->selectproc = &ht6560b_selectproc; | 354 | mate->selectproc = &ht6560b_selectproc; |
344 | mate->set_pio_mode = &ht6560b_set_pio_mode; | 355 | mate->set_pio_mode = &ht6560b_set_pio_mode; |
345 | 356 | ||
346 | /* | 357 | hwif->port_init_devs = ht6560b_port_init_devs; |
347 | * Setting default configurations for drives | 358 | mate->port_init_devs = ht6560b_port_init_devs; |
348 | */ | ||
349 | t = (HT_CONFIG_DEFAULT << 8); | ||
350 | t |= HT_TIMING_DEFAULT; | ||
351 | hwif->drives[0].drive_data = t; | ||
352 | hwif->drives[1].drive_data = t; | ||
353 | |||
354 | t |= (HT_SECONDARY_IF << 8); | ||
355 | mate->drives[0].drive_data = t; | ||
356 | mate->drives[1].drive_data = t; | ||
357 | 359 | ||
358 | ide_device_add(idx, &ht6560b_port_info); | 360 | ide_device_add(idx, &ht6560b_port_info); |
359 | 361 | ||