diff options
Diffstat (limited to 'drivers/ide/arm')
-rw-r--r-- | drivers/ide/arm/bast-ide.c | 20 | ||||
-rw-r--r-- | drivers/ide/arm/icside.c | 25 | ||||
-rw-r--r-- | drivers/ide/arm/ide_arm.c | 2 | ||||
-rw-r--r-- | drivers/ide/arm/rapide.c | 4 |
4 files changed, 35 insertions, 16 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 037300fa284c..0e7574c0ee60 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c | |||
@@ -28,8 +28,10 @@ static int __init | |||
28 | bastide_register(unsigned int base, unsigned int aux, int irq, | 28 | bastide_register(unsigned int base, unsigned int aux, int irq, |
29 | ide_hwif_t **hwif) | 29 | ide_hwif_t **hwif) |
30 | { | 30 | { |
31 | ide_hwif_t *hwif; | ||
31 | hw_regs_t hw; | 32 | hw_regs_t hw; |
32 | int i; | 33 | int i; |
34 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
33 | 35 | ||
34 | memset(&hw, 0, sizeof(hw)); | 36 | memset(&hw, 0, sizeof(hw)); |
35 | 37 | ||
@@ -44,8 +46,24 @@ bastide_register(unsigned int base, unsigned int aux, int irq, | |||
44 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); | 46 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); |
45 | hw.irq = irq; | 47 | hw.irq = irq; |
46 | 48 | ||
47 | ide_register_hw(&hw, NULL, hwif); | 49 | hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]); |
50 | if (hwif == NULL) | ||
51 | goto out; | ||
48 | 52 | ||
53 | i = hwif->index; | ||
54 | |||
55 | if (hwif->present) | ||
56 | ide_unregister(i, 0, 0); | ||
57 | else if (!hwif->hold) | ||
58 | ide_init_port_data(hwif, i); | ||
59 | |||
60 | ide_init_port_hw(hwif, &hw); | ||
61 | hwif->quirkproc = NULL; | ||
62 | |||
63 | idx[0] = i; | ||
64 | |||
65 | ide_device_add(idx, NULL); | ||
66 | out: | ||
49 | return 0; | 67 | return 0; |
50 | } | 68 | } |
51 | 69 | ||
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 8d2cc47a362e..fb00f3827ecd 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -377,9 +377,6 @@ static void icside_dma_lost_irq(ide_drive_t *drive) | |||
377 | 377 | ||
378 | static void icside_dma_init(ide_hwif_t *hwif) | 378 | static void icside_dma_init(ide_hwif_t *hwif) |
379 | { | 379 | { |
380 | hwif->mwdma_mask = 7; /* MW0..2 */ | ||
381 | hwif->swdma_mask = 7; /* SW0..2 */ | ||
382 | |||
383 | hwif->dmatable_cpu = NULL; | 380 | hwif->dmatable_cpu = NULL; |
384 | hwif->dmatable_dma = 0; | 381 | hwif->dmatable_dma = 0; |
385 | hwif->set_dma_mode = icside_set_dma_mode; | 382 | hwif->set_dma_mode = icside_set_dma_mode; |
@@ -459,11 +456,19 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
459 | 456 | ||
460 | idx[0] = hwif->index; | 457 | idx[0] = hwif->index; |
461 | 458 | ||
462 | ide_device_add(idx); | 459 | ide_device_add(idx, NULL); |
463 | 460 | ||
464 | return 0; | 461 | return 0; |
465 | } | 462 | } |
466 | 463 | ||
464 | static const struct ide_port_info icside_v6_port_info __initdata = { | ||
465 | .host_flags = IDE_HFLAG_SERIALIZE | | ||
466 | IDE_HFLAG_NO_DMA | /* no SFF-style DMA */ | ||
467 | IDE_HFLAG_NO_AUTOTUNE, | ||
468 | .mwdma_mask = ATA_MWDMA2, | ||
469 | .swdma_mask = ATA_SWDMA2, | ||
470 | }; | ||
471 | |||
467 | static int __init | 472 | static int __init |
468 | icside_register_v6(struct icside_state *state, struct expansion_card *ec) | 473 | icside_register_v6(struct icside_state *state, struct expansion_card *ec) |
469 | { | 474 | { |
@@ -472,6 +477,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
472 | unsigned int sel = 0; | 477 | unsigned int sel = 0; |
473 | int ret; | 478 | int ret; |
474 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 479 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
480 | struct ide_port_info d = icside_v6_port_info; | ||
475 | 481 | ||
476 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); | 482 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
477 | if (!ioc_base) { | 483 | if (!ioc_base) { |
@@ -521,30 +527,25 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
521 | state->hwif[1] = mate; | 527 | state->hwif[1] = mate; |
522 | 528 | ||
523 | hwif->maskproc = icside_maskproc; | 529 | hwif->maskproc = icside_maskproc; |
524 | hwif->channel = 0; | ||
525 | hwif->hwif_data = state; | 530 | hwif->hwif_data = state; |
526 | hwif->mate = mate; | ||
527 | hwif->serialized = 1; | ||
528 | hwif->config_data = (unsigned long)ioc_base; | 531 | hwif->config_data = (unsigned long)ioc_base; |
529 | hwif->select_data = sel; | 532 | hwif->select_data = sel; |
530 | 533 | ||
531 | mate->maskproc = icside_maskproc; | 534 | mate->maskproc = icside_maskproc; |
532 | mate->channel = 1; | ||
533 | mate->hwif_data = state; | 535 | mate->hwif_data = state; |
534 | mate->mate = hwif; | ||
535 | mate->serialized = 1; | ||
536 | mate->config_data = (unsigned long)ioc_base; | 536 | mate->config_data = (unsigned long)ioc_base; |
537 | mate->select_data = sel | 1; | 537 | mate->select_data = sel | 1; |
538 | 538 | ||
539 | if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { | 539 | if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { |
540 | icside_dma_init(hwif); | 540 | icside_dma_init(hwif); |
541 | icside_dma_init(mate); | 541 | icside_dma_init(mate); |
542 | } | 542 | } else |
543 | d.mwdma_mask = d.swdma_mask = 0; | ||
543 | 544 | ||
544 | idx[0] = hwif->index; | 545 | idx[0] = hwif->index; |
545 | idx[1] = mate->index; | 546 | idx[1] = mate->index; |
546 | 547 | ||
547 | ide_device_add(idx); | 548 | ide_device_add(idx, &d); |
548 | 549 | ||
549 | return 0; | 550 | return 0; |
550 | 551 | ||
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c index 60f2497542c0..43a70e91363e 100644 --- a/drivers/ide/arm/ide_arm.c +++ b/drivers/ide/arm/ide_arm.c | |||
@@ -39,7 +39,7 @@ static int __init ide_arm_init(void) | |||
39 | ide_init_port_hw(hwif, &hw); | 39 | ide_init_port_hw(hwif, &hw); |
40 | idx[0] = hwif->index; | 40 | idx[0] = hwif->index; |
41 | 41 | ||
42 | ide_device_add(idx); | 42 | ide_device_add(idx, NULL); |
43 | } | 43 | } |
44 | 44 | ||
45 | return 0; | 45 | return 0; |
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index c8b6581e624e..efba00d2fc37 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c | |||
@@ -58,7 +58,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
58 | 58 | ||
59 | idx[0] = hwif->index; | 59 | idx[0] = hwif->index; |
60 | 60 | ||
61 | ide_device_add(idx); | 61 | ide_device_add(idx, NULL); |
62 | 62 | ||
63 | ecard_set_drvdata(ec, hwif); | 63 | ecard_set_drvdata(ec, hwif); |
64 | goto out; | 64 | goto out; |
@@ -76,7 +76,7 @@ static void __devexit rapide_remove(struct expansion_card *ec) | |||
76 | 76 | ||
77 | ecard_set_drvdata(ec, NULL); | 77 | ecard_set_drvdata(ec, NULL); |
78 | 78 | ||
79 | ide_unregister(hwif->index); | 79 | ide_unregister(hwif->index, 0, 0); |
80 | 80 | ||
81 | ecard_release_resources(ec); | 81 | ecard_release_resources(ec); |
82 | } | 82 | } |