diff options
| -rw-r--r-- | arch/arm/kernel/ecard.c | 29 | ||||
| -rw-r--r-- | arch/arm/mach-rpc/include/mach/hardware.h | 11 | ||||
| -rw-r--r-- | arch/arm/mach-rpc/include/mach/io.h | 3 |
3 files changed, 14 insertions, 29 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 920f1a371a22..3e84f66de8f7 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
| @@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void) | |||
| 674 | #define ecard_probeirqhw() (0) | 674 | #define ecard_probeirqhw() (0) |
| 675 | #endif | 675 | #endif |
| 676 | 676 | ||
| 677 | #ifndef IO_EC_MEMC8_BASE | ||
| 678 | #define IO_EC_MEMC8_BASE 0 | ||
| 679 | #endif | ||
| 680 | |||
| 681 | static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) | 677 | static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) |
| 682 | { | 678 | { |
| 683 | unsigned long address = 0; | 679 | void __iomem *address = NULL; |
| 684 | int slot = ec->slot_no; | 680 | int slot = ec->slot_no; |
| 685 | 681 | ||
| 686 | if (ec->slot_no == 8) | 682 | if (ec->slot_no == 8) |
| 687 | return (void __iomem *)ioaddr(IO_EC_MEMC8_BASE); | 683 | return ECARD_MEMC8_BASE; |
| 688 | 684 | ||
| 689 | ectcr &= ~(1 << slot); | 685 | ectcr &= ~(1 << slot); |
| 690 | 686 | ||
| 691 | switch (type) { | 687 | switch (type) { |
| 692 | case ECARD_MEMC: | 688 | case ECARD_MEMC: |
| 693 | if (slot < 4) | 689 | if (slot < 4) |
| 694 | address = IO_EC_MEMC_BASE + (slot << 12); | 690 | address = ECARD_MEMC_BASE + (slot << 14); |
| 695 | break; | 691 | break; |
| 696 | 692 | ||
| 697 | case ECARD_IOC: | 693 | case ECARD_IOC: |
| 698 | if (slot < 4) | 694 | if (slot < 4) |
| 699 | address = IO_EC_IOC_BASE + (slot << 12); | 695 | address = ECARD_IOC_BASE + (slot << 14); |
| 700 | #ifdef IO_EC_IOC4_BASE | ||
| 701 | else | 696 | else |
| 702 | address = IO_EC_IOC4_BASE + ((slot - 4) << 12); | 697 | address = ECARD_IOC4_BASE + ((slot - 4) << 14); |
| 703 | #endif | ||
| 704 | if (address) | 698 | if (address) |
| 705 | address += speed << 17; | 699 | address += speed << 19; |
| 706 | break; | 700 | break; |
| 707 | 701 | ||
| 708 | #ifdef IO_EC_EASI_BASE | ||
| 709 | case ECARD_EASI: | 702 | case ECARD_EASI: |
| 710 | address = IO_EC_EASI_BASE + (slot << 22); | 703 | address = ECARD_EASI_BASE + (slot << 24); |
| 711 | if (speed == ECARD_FAST) | 704 | if (speed == ECARD_FAST) |
| 712 | ectcr |= 1 << slot; | 705 | ectcr |= 1 << slot; |
| 713 | break; | 706 | break; |
| 714 | #endif | 707 | |
| 715 | default: | 708 | default: |
| 716 | break; | 709 | break; |
| 717 | } | 710 | } |
| @@ -719,7 +712,7 @@ static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t | |||
| 719 | #ifdef IOMD_ECTCR | 712 | #ifdef IOMD_ECTCR |
| 720 | iomd_writeb(ectcr, IOMD_ECTCR); | 713 | iomd_writeb(ectcr, IOMD_ECTCR); |
| 721 | #endif | 714 | #endif |
| 722 | return (void __iomem *)(address ? ioaddr(address) : NULL); | 715 | return address; |
| 723 | } | 716 | } |
| 724 | 717 | ||
| 725 | static int ecard_prints(struct seq_file *m, ecard_t *ec) | 718 | static int ecard_prints(struct seq_file *m, ecard_t *ec) |
| @@ -1049,10 +1042,8 @@ ecard_probe(int slot, card_type_t type) | |||
| 1049 | set_irq_flags(ec->irq, IRQF_VALID); | 1042 | set_irq_flags(ec->irq, IRQF_VALID); |
| 1050 | } | 1043 | } |
| 1051 | 1044 | ||
| 1052 | #ifdef IO_EC_MEMC8_BASE | ||
| 1053 | if (slot == 8) | 1045 | if (slot == 8) |
| 1054 | ec->irq = 11; | 1046 | ec->irq = 11; |
| 1055 | #endif | ||
| 1056 | #ifdef CONFIG_ARCH_RPC | 1047 | #ifdef CONFIG_ARCH_RPC |
| 1057 | /* On RiscPC, only first two slots have DMA capability */ | 1048 | /* On RiscPC, only first two slots have DMA capability */ |
| 1058 | if (slot < 2) | 1049 | if (slot < 2) |
| @@ -1098,9 +1089,7 @@ static int __init ecard_init(void) | |||
| 1098 | ecard_probe(slot, ECARD_IOC); | 1089 | ecard_probe(slot, ECARD_IOC); |
| 1099 | } | 1090 | } |
| 1100 | 1091 | ||
| 1101 | #ifdef IO_EC_MEMC8_BASE | ||
| 1102 | ecard_probe(8, ECARD_IOC); | 1092 | ecard_probe(8, ECARD_IOC); |
| 1103 | #endif | ||
| 1104 | 1093 | ||
| 1105 | irqhw = ecard_probeirqhw(); | 1094 | irqhw = ecard_probeirqhw(); |
| 1106 | 1095 | ||
diff --git a/arch/arm/mach-rpc/include/mach/hardware.h b/arch/arm/mach-rpc/include/mach/hardware.h index 822b810215d7..41777660d9fe 100644 --- a/arch/arm/mach-rpc/include/mach/hardware.h +++ b/arch/arm/mach-rpc/include/mach/hardware.h | |||
| @@ -51,21 +51,20 @@ | |||
| 51 | /* | 51 | /* |
| 52 | * IO Addresses | 52 | * IO Addresses |
| 53 | */ | 53 | */ |
| 54 | #define ECARD_EASI_BASE (IO_BASE + 0x05000000) | ||
| 54 | #define VIDC_BASE (IO_BASE + 0x00400000) | 55 | #define VIDC_BASE (IO_BASE + 0x00400000) |
| 55 | #define EXPMASK_BASE (IO_BASE + 0x00360000) | 56 | #define EXPMASK_BASE (IO_BASE + 0x00360000) |
| 57 | #define ECARD_IOC4_BASE (IO_BASE + 0x00270000) | ||
| 58 | #define ECARD_IOC_BASE (IO_BASE + 0x00240000) | ||
| 56 | #define IOMD_BASE (IO_BASE + 0x00200000) | 59 | #define IOMD_BASE (IO_BASE + 0x00200000) |
| 57 | #define IOC_BASE (IO_BASE + 0x00200000) | 60 | #define IOC_BASE (IO_BASE + 0x00200000) |
| 61 | #define ECARD_MEMC8_BASE (IO_BASE + 0x0002b000) | ||
| 58 | #define FLOPPYDMA_BASE (IO_BASE + 0x0002a000) | 62 | #define FLOPPYDMA_BASE (IO_BASE + 0x0002a000) |
| 59 | #define PCIO_BASE (IO_BASE + 0x00010000) | 63 | #define PCIO_BASE (IO_BASE + 0x00010000) |
| 64 | #define ECARD_MEMC_BASE (IO_BASE + 0x00000000) | ||
| 60 | 65 | ||
| 61 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | 66 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) |
| 62 | 67 | ||
| 63 | #define IO_EC_EASI_BASE 0x81400000 | ||
| 64 | #define IO_EC_IOC4_BASE 0x8009c000 | ||
| 65 | #define IO_EC_IOC_BASE 0x80090000 | ||
| 66 | #define IO_EC_MEMC8_BASE 0x8000ac00 | ||
| 67 | #define IO_EC_MEMC_BASE 0x80000000 | ||
| 68 | |||
| 69 | #define NETSLOT_BASE 0x0302b000 | 68 | #define NETSLOT_BASE 0x0302b000 |
| 70 | #define NETSLOT_SIZE 0x00001000 | 69 | #define NETSLOT_SIZE 0x00001000 |
| 71 | 70 | ||
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h index 20da7f486e51..dd706ff25940 100644 --- a/arch/arm/mach-rpc/include/mach/io.h +++ b/arch/arm/mach-rpc/include/mach/io.h | |||
| @@ -196,9 +196,6 @@ DECLARE_IO(int,l,"") | |||
| 196 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | 196 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) |
| 197 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | 197 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) |
| 198 | 198 | ||
| 199 | /* the following macro is deprecated */ | ||
| 200 | #define ioaddr(port) ((unsigned long)__ioaddr((port))) | ||
| 201 | |||
| 202 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | 199 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) |
| 203 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | 200 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) |
| 204 | 201 | ||
