diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 12 | ||||
-rw-r--r-- | arch/arm/kernel/ecard.c | 36 |
2 files changed, 25 insertions, 23 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 16baba2e4369..1429d8989fb9 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
21 | #include <asm/memory.h> | 21 | #include <asm/memory.h> |
22 | #include <asm/procinfo.h> | 22 | #include <asm/procinfo.h> |
23 | #include <asm/hardware/cache-l2x0.h> | ||
23 | #include <linux/kbuild.h> | 24 | #include <linux/kbuild.h> |
24 | 25 | ||
25 | /* | 26 | /* |
@@ -92,6 +93,17 @@ int main(void) | |||
92 | DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); | 93 | DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); |
93 | DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); | 94 | DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); |
94 | BLANK(); | 95 | BLANK(); |
96 | #ifdef CONFIG_CACHE_L2X0 | ||
97 | DEFINE(L2X0_R_PHY_BASE, offsetof(struct l2x0_regs, phy_base)); | ||
98 | DEFINE(L2X0_R_AUX_CTRL, offsetof(struct l2x0_regs, aux_ctrl)); | ||
99 | DEFINE(L2X0_R_TAG_LATENCY, offsetof(struct l2x0_regs, tag_latency)); | ||
100 | DEFINE(L2X0_R_DATA_LATENCY, offsetof(struct l2x0_regs, data_latency)); | ||
101 | DEFINE(L2X0_R_FILTER_START, offsetof(struct l2x0_regs, filter_start)); | ||
102 | DEFINE(L2X0_R_FILTER_END, offsetof(struct l2x0_regs, filter_end)); | ||
103 | DEFINE(L2X0_R_PREFETCH_CTRL, offsetof(struct l2x0_regs, prefetch_ctrl)); | ||
104 | DEFINE(L2X0_R_PWR_CTRL, offsetof(struct l2x0_regs, pwr_ctrl)); | ||
105 | BLANK(); | ||
106 | #endif | ||
95 | #ifdef CONFIG_CPU_HAS_ASID | 107 | #ifdef CONFIG_CPU_HAS_ASID |
96 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); | 108 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); |
97 | BLANK(); | 109 | BLANK(); |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index d16500110ee9..4dd0edab6a65 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -237,7 +237,7 @@ static void ecard_init_pgtables(struct mm_struct *mm) | |||
237 | 237 | ||
238 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); | 238 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); |
239 | 239 | ||
240 | src_pgd = pgd_offset(mm, EASI_BASE); | 240 | src_pgd = pgd_offset(mm, (unsigned long)EASI_BASE); |
241 | dst_pgd = pgd_offset(mm, EASI_START); | 241 | dst_pgd = pgd_offset(mm, EASI_START); |
242 | 242 | ||
243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); | 243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); |
@@ -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 | 677 | static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) |
678 | #define IO_EC_MEMC8_BASE 0 | ||
679 | #endif | ||
680 | |||
681 | static unsigned int __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 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 | } |
@@ -990,6 +983,7 @@ ecard_probe(int slot, card_type_t type) | |||
990 | ecard_t **ecp; | 983 | ecard_t **ecp; |
991 | ecard_t *ec; | 984 | ecard_t *ec; |
992 | struct ex_ecid cid; | 985 | struct ex_ecid cid; |
986 | void __iomem *addr; | ||
993 | int i, rc; | 987 | int i, rc; |
994 | 988 | ||
995 | ec = ecard_alloc_card(type, slot); | 989 | ec = ecard_alloc_card(type, slot); |
@@ -999,7 +993,7 @@ ecard_probe(int slot, card_type_t type) | |||
999 | } | 993 | } |
1000 | 994 | ||
1001 | rc = -ENODEV; | 995 | rc = -ENODEV; |
1002 | if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0) | 996 | if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL) |
1003 | goto nodev; | 997 | goto nodev; |
1004 | 998 | ||
1005 | cid.r_zero = 1; | 999 | cid.r_zero = 1; |
@@ -1019,7 +1013,7 @@ ecard_probe(int slot, card_type_t type) | |||
1019 | ec->cid.fiqmask = cid.r_fiqmask; | 1013 | ec->cid.fiqmask = cid.r_fiqmask; |
1020 | ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); | 1014 | ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); |
1021 | ec->fiqaddr = | 1015 | ec->fiqaddr = |
1022 | ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); | 1016 | ec->irqaddr = addr; |
1023 | 1017 | ||
1024 | if (ec->cid.is) { | 1018 | if (ec->cid.is) { |
1025 | ec->irqmask = ec->cid.irqmask; | 1019 | ec->irqmask = ec->cid.irqmask; |
@@ -1048,10 +1042,8 @@ ecard_probe(int slot, card_type_t type) | |||
1048 | set_irq_flags(ec->irq, IRQF_VALID); | 1042 | set_irq_flags(ec->irq, IRQF_VALID); |
1049 | } | 1043 | } |
1050 | 1044 | ||
1051 | #ifdef IO_EC_MEMC8_BASE | ||
1052 | if (slot == 8) | 1045 | if (slot == 8) |
1053 | ec->irq = 11; | 1046 | ec->irq = 11; |
1054 | #endif | ||
1055 | #ifdef CONFIG_ARCH_RPC | 1047 | #ifdef CONFIG_ARCH_RPC |
1056 | /* On RiscPC, only first two slots have DMA capability */ | 1048 | /* On RiscPC, only first two slots have DMA capability */ |
1057 | if (slot < 2) | 1049 | if (slot < 2) |
@@ -1097,9 +1089,7 @@ static int __init ecard_init(void) | |||
1097 | ecard_probe(slot, ECARD_IOC); | 1089 | ecard_probe(slot, ECARD_IOC); |
1098 | } | 1090 | } |
1099 | 1091 | ||
1100 | #ifdef IO_EC_MEMC8_BASE | ||
1101 | ecard_probe(8, ECARD_IOC); | 1092 | ecard_probe(8, ECARD_IOC); |
1102 | #endif | ||
1103 | 1093 | ||
1104 | irqhw = ecard_probeirqhw(); | 1094 | irqhw = ecard_probeirqhw(); |
1105 | 1095 | ||