diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-12 21:11:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-12 21:11:33 -0400 |
commit | f7d02ae76ebbf5b8a9531fe150c49e126a397704 (patch) | |
tree | bcfdcab6e70658d55a3c843694e04e938bf9168f /drivers/ide/arm/icside.c | |
parent | 78db2ad6f4df9145bfd6aab1c0f1c56d615288ec (diff) | |
parent | 158304ef09a28c7f2dd37d78f536a4e09ba084a1 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
[ARM] Use new get_irqnr_preamble
[ARM] Ensure machine class menu is sorted alphabetically
[ARM] 4333/2: KS8695: Micrel Development board
[ARM] 4332/2: KS8695: Serial driver
[ARM] 4331/3: Support for Micrel/Kendin KS8695 processor
[ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board
[ARM] 4372/1: Define byte sizes in asm-arm/sizes.h
[ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors.
[ARM] Update mach-types
[ARM] export symbol csum_partial_copy_from_user
[ARM] iop13xx: msi support
[ARM] stacktrace fix
[ARM] Spinlock initializer cleanup
[ARM] remove useless config option GENERIC_BUST_SPINLOCK
[ARM] 4303/3: base kernel support for TI DaVinci
[ARM] 4369/1: AT91: Fix circular dependency in header files
[ARM] 4368/1: S3C24xx: build fix
[ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK
[ARM] Fix iop32x/iop33x build
[ARM] EBSA110: fix build errors caused by missing "const"
...
Diffstat (limited to 'drivers/ide/arm/icside.c')
-rw-r--r-- | drivers/ide/arm/icside.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 1fe0457243db..66f826252aee 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -565,8 +565,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
565 | ide_hwif_t *hwif; | 565 | ide_hwif_t *hwif; |
566 | void __iomem *base; | 566 | void __iomem *base; |
567 | 567 | ||
568 | base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), | 568 | base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); |
569 | ecard_resource_len(ec, ECARD_RES_MEMC)); | ||
570 | if (!base) | 569 | if (!base) |
571 | return -ENOMEM; | 570 | return -ENOMEM; |
572 | 571 | ||
@@ -574,8 +573,8 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
574 | 573 | ||
575 | ec->irqaddr = base + ICS_ARCIN_V5_INTRSTAT; | 574 | ec->irqaddr = base + ICS_ARCIN_V5_INTRSTAT; |
576 | ec->irqmask = 1; | 575 | ec->irqmask = 1; |
577 | ec->irq_data = state; | 576 | |
578 | ec->ops = &icside_ops_arcin_v5; | 577 | ecard_setirq(ec, &icside_ops_arcin_v5, state); |
579 | 578 | ||
580 | /* | 579 | /* |
581 | * Be on the safe side - disable interrupts | 580 | * Be on the safe side - disable interrupts |
@@ -583,10 +582,8 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
583 | icside_irqdisable_arcin_v5(ec, 0); | 582 | icside_irqdisable_arcin_v5(ec, 0); |
584 | 583 | ||
585 | hwif = icside_setup(base, &icside_cardinfo_v5, ec); | 584 | hwif = icside_setup(base, &icside_cardinfo_v5, ec); |
586 | if (!hwif) { | 585 | if (!hwif) |
587 | iounmap(base); | ||
588 | return -ENODEV; | 586 | return -ENODEV; |
589 | } | ||
590 | 587 | ||
591 | state->hwif[0] = hwif; | 588 | state->hwif[0] = hwif; |
592 | 589 | ||
@@ -605,8 +602,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
605 | unsigned int sel = 0; | 602 | unsigned int sel = 0; |
606 | int ret; | 603 | int ret; |
607 | 604 | ||
608 | ioc_base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), | 605 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
609 | ecard_resource_len(ec, ECARD_RES_IOCFAST)); | ||
610 | if (!ioc_base) { | 606 | if (!ioc_base) { |
611 | ret = -ENOMEM; | 607 | ret = -ENOMEM; |
612 | goto out; | 608 | goto out; |
@@ -615,11 +611,10 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
615 | easi_base = ioc_base; | 611 | easi_base = ioc_base; |
616 | 612 | ||
617 | if (ecard_resource_flags(ec, ECARD_RES_EASI)) { | 613 | if (ecard_resource_flags(ec, ECARD_RES_EASI)) { |
618 | easi_base = ioremap(ecard_resource_start(ec, ECARD_RES_EASI), | 614 | easi_base = ecardm_iomap(ec, ECARD_RES_EASI, 0, 0); |
619 | ecard_resource_len(ec, ECARD_RES_EASI)); | ||
620 | if (!easi_base) { | 615 | if (!easi_base) { |
621 | ret = -ENOMEM; | 616 | ret = -ENOMEM; |
622 | goto unmap_slot; | 617 | goto out; |
623 | } | 618 | } |
624 | 619 | ||
625 | /* | 620 | /* |
@@ -630,8 +625,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
630 | 625 | ||
631 | writeb(sel, ioc_base); | 626 | writeb(sel, ioc_base); |
632 | 627 | ||
633 | ec->irq_data = state; | 628 | ecard_setirq(ec, &icside_ops_arcin_v6, state); |
634 | ec->ops = &icside_ops_arcin_v6; | ||
635 | 629 | ||
636 | state->irq_port = easi_base; | 630 | state->irq_port = easi_base; |
637 | state->ioc_base = ioc_base; | 631 | state->ioc_base = ioc_base; |
@@ -649,7 +643,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
649 | 643 | ||
650 | if (!hwif || !mate) { | 644 | if (!hwif || !mate) { |
651 | ret = -ENODEV; | 645 | ret = -ENODEV; |
652 | goto unmap_port; | 646 | goto out; |
653 | } | 647 | } |
654 | 648 | ||
655 | state->hwif[0] = hwif; | 649 | state->hwif[0] = hwif; |
@@ -686,11 +680,6 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
686 | 680 | ||
687 | return 0; | 681 | return 0; |
688 | 682 | ||
689 | unmap_port: | ||
690 | if (easi_base != ioc_base) | ||
691 | iounmap(easi_base); | ||
692 | unmap_slot: | ||
693 | iounmap(ioc_base); | ||
694 | out: | 683 | out: |
695 | return ret; | 684 | return ret; |
696 | } | 685 | } |
@@ -716,8 +705,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
716 | state->type = ICS_TYPE_NOTYPE; | 705 | state->type = ICS_TYPE_NOTYPE; |
717 | state->dev = &ec->dev; | 706 | state->dev = &ec->dev; |
718 | 707 | ||
719 | idmem = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), | 708 | idmem = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
720 | ecard_resource_len(ec, ECARD_RES_IOCFAST)); | ||
721 | if (idmem) { | 709 | if (idmem) { |
722 | unsigned int type; | 710 | unsigned int type; |
723 | 711 | ||
@@ -725,7 +713,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
725 | type |= (readb(idmem + ICS_IDENT_OFFSET + 4) & 1) << 1; | 713 | type |= (readb(idmem + ICS_IDENT_OFFSET + 4) & 1) << 1; |
726 | type |= (readb(idmem + ICS_IDENT_OFFSET + 8) & 1) << 2; | 714 | type |= (readb(idmem + ICS_IDENT_OFFSET + 8) & 1) << 2; |
727 | type |= (readb(idmem + ICS_IDENT_OFFSET + 12) & 1) << 3; | 715 | type |= (readb(idmem + ICS_IDENT_OFFSET + 12) & 1) << 3; |
728 | iounmap(idmem); | 716 | ecardm_iounmap(ec, idmem); |
729 | 717 | ||
730 | state->type = type; | 718 | state->type = type; |
731 | } | 719 | } |
@@ -793,13 +781,6 @@ static void __devexit icside_remove(struct expansion_card *ec) | |||
793 | } | 781 | } |
794 | 782 | ||
795 | ecard_set_drvdata(ec, NULL); | 783 | ecard_set_drvdata(ec, NULL); |
796 | ec->ops = NULL; | ||
797 | ec->irq_data = NULL; | ||
798 | |||
799 | if (state->ioc_base) | ||
800 | iounmap(state->ioc_base); | ||
801 | if (state->ioc_base != state->irq_port) | ||
802 | iounmap(state->irq_port); | ||
803 | 784 | ||
804 | kfree(state); | 785 | kfree(state); |
805 | ecard_release_resources(ec); | 786 | ecard_release_resources(ec); |