aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:44 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:44 -0400
commit67717e224181527987cce800fa2ddb5c8c1e9315 (patch)
tree0fbb75e264d2d8bf6ec065b307f840a1f8bde716 /drivers/ide/arm
parent47bc7e7425d198ad1f8c4597b0bf28619fcce0fd (diff)
icside: always try to probe first interface
Try to probe first interface even if ide_hwifs[]'s slot for the second interface cannot be obtained. While at it: - Add DRV_NAME define and use it for request_dma() instead of hwif->name. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm')
-rw-r--r--drivers/ide/arm/icside.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index c8d860060329..52f58c885783 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -21,6 +21,8 @@
21#include <asm/dma.h> 21#include <asm/dma.h>
22#include <asm/ecard.h> 22#include <asm/ecard.h>
23 23
24#define DRV_NAME "icside"
25
24#define ICS_IDENT_OFFSET 0x2280 26#define ICS_IDENT_OFFSET 0x2280
25 27
26#define ICS_ARCIN_V5_INTRSTAT 0x0000 28#define ICS_ARCIN_V5_INTRSTAT 0x0000
@@ -546,27 +548,27 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
546 ide_init_port_hw(hwif, &hw[0]); 548 ide_init_port_hw(hwif, &hw[0]);
547 default_hwif_mmiops(hwif); 549 default_hwif_mmiops(hwif);
548 550
551 idx[0] = hwif->index;
552
549 mate = ide_find_port(); 553 mate = ide_find_port();
550 if (mate == NULL) 554 if (mate) {
551 return -ENODEV; 555 ide_init_port_hw(mate, &hw[1]);
556 default_hwif_mmiops(mate);
552 557
553 ide_init_port_hw(mate, &hw[1]); 558 idx[1] = mate->index;
554 default_hwif_mmiops(mate); 559 }
555 560
556 state->hwif[0] = hwif; 561 state->hwif[0] = hwif;
557 state->hwif[1] = mate; 562 state->hwif[1] = mate;
558 563
559 ecard_set_drvdata(ec, state); 564 ecard_set_drvdata(ec, state);
560 565
561 if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { 566 if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
562 d.init_dma = icside_dma_init; 567 d.init_dma = icside_dma_init;
563 d.port_ops = &icside_v6_port_ops; 568 d.port_ops = &icside_v6_port_ops;
564 d.dma_ops = NULL; 569 d.dma_ops = NULL;
565 } 570 }
566 571
567 idx[0] = hwif->index;
568 idx[1] = mate->index;
569
570 ide_device_add(idx, &d); 572 ide_device_add(idx, &d);
571 573
572 return 0; 574 return 0;