aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm/icside.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/arm/icside.c')
-rw-r--r--drivers/ide/arm/icside.c25
1 files changed, 13 insertions, 12 deletions
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
378static void icside_dma_init(ide_hwif_t *hwif) 378static 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
464static 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
467static int __init 472static int __init
468icside_register_v6(struct icside_state *state, struct expansion_card *ec) 473icside_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