diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-10-10 09:51:16 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 18:03:48 -0400 |
commit | 36156cdff17a5ab822898d33cd890a6f8287c43c (patch) | |
tree | 256f8f15cb24067fd69243759a078f30965d085e /drivers/net | |
parent | 4569504a36cb6223e2b7ad6530326a1563a8f456 (diff) |
[PATCH] declance: Use physical addresses at the interface level.
Use physical addresses at the interface level, letting drivers remap
them as appropriate.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/declance.c | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/declance.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index b47e3cf16516..f130bdab3fd3 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * adopted from sunlance.c by Richard van den Berg | 6 | * adopted from sunlance.c by Richard van den Berg |
7 | * | 7 | * |
8 | * Copyright (C) 2002, 2003 Maciej W. Rozycki | 8 | * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki |
9 | * | 9 | * |
10 | * additional sources: | 10 | * additional sources: |
11 | * - PMAD-AA TURBOchannel Ethernet Module Functional Specification, | 11 | * - PMAD-AA TURBOchannel Ethernet Module Functional Specification, |
@@ -57,13 +57,15 @@ | |||
57 | #include <linux/string.h> | 57 | #include <linux/string.h> |
58 | 58 | ||
59 | #include <asm/addrspace.h> | 59 | #include <asm/addrspace.h> |
60 | #include <asm/system.h> | ||
61 | |||
60 | #include <asm/dec/interrupts.h> | 62 | #include <asm/dec/interrupts.h> |
61 | #include <asm/dec/ioasic.h> | 63 | #include <asm/dec/ioasic.h> |
62 | #include <asm/dec/ioasic_addrs.h> | 64 | #include <asm/dec/ioasic_addrs.h> |
63 | #include <asm/dec/kn01.h> | 65 | #include <asm/dec/kn01.h> |
64 | #include <asm/dec/machtype.h> | 66 | #include <asm/dec/machtype.h> |
67 | #include <asm/dec/system.h> | ||
65 | #include <asm/dec/tc.h> | 68 | #include <asm/dec/tc.h> |
66 | #include <asm/system.h> | ||
67 | 69 | ||
68 | static char version[] __devinitdata = | 70 | static char version[] __devinitdata = |
69 | "declance.c: v0.009 by Linux MIPS DECstation task force\n"; | 71 | "declance.c: v0.009 by Linux MIPS DECstation task force\n"; |
@@ -79,10 +81,6 @@ MODULE_LICENSE("GPL"); | |||
79 | #define PMAD_LANCE 2 | 81 | #define PMAD_LANCE 2 |
80 | #define PMAX_LANCE 3 | 82 | #define PMAX_LANCE 3 |
81 | 83 | ||
82 | #ifndef CONFIG_TC | ||
83 | unsigned long system_base; | ||
84 | unsigned long dmaptr; | ||
85 | #endif | ||
86 | 84 | ||
87 | #define LE_CSR0 0 | 85 | #define LE_CSR0 0 |
88 | #define LE_CSR1 1 | 86 | #define LE_CSR1 1 |
@@ -1027,10 +1025,6 @@ static int __init dec_lance_init(const int type, const int slot) | |||
1027 | unsigned long esar_base; | 1025 | unsigned long esar_base; |
1028 | unsigned char *esar; | 1026 | unsigned char *esar; |
1029 | 1027 | ||
1030 | #ifndef CONFIG_TC | ||
1031 | system_base = KN01_LANCE_BASE; | ||
1032 | #endif | ||
1033 | |||
1034 | if (dec_lance_debug && version_printed++ == 0) | 1028 | if (dec_lance_debug && version_printed++ == 0) |
1035 | printk(version); | 1029 | printk(version); |
1036 | 1030 | ||
@@ -1063,7 +1057,7 @@ static int __init dec_lance_init(const int type, const int slot) | |||
1063 | switch (type) { | 1057 | switch (type) { |
1064 | #ifdef CONFIG_TC | 1058 | #ifdef CONFIG_TC |
1065 | case ASIC_LANCE: | 1059 | case ASIC_LANCE: |
1066 | dev->base_addr = system_base + IOASIC_LANCE; | 1060 | dev->base_addr = CKSEG1ADDR(dec_kn_slot_base + IOASIC_LANCE); |
1067 | 1061 | ||
1068 | /* buffer space for the on-board LANCE shared memory */ | 1062 | /* buffer space for the on-board LANCE shared memory */ |
1069 | /* | 1063 | /* |
@@ -1072,7 +1066,7 @@ static int __init dec_lance_init(const int type, const int slot) | |||
1072 | dev->mem_start = CKSEG1ADDR(0x00020000); | 1066 | dev->mem_start = CKSEG1ADDR(0x00020000); |
1073 | dev->mem_end = dev->mem_start + 0x00020000; | 1067 | dev->mem_end = dev->mem_start + 0x00020000; |
1074 | dev->irq = dec_interrupt[DEC_IRQ_LANCE]; | 1068 | dev->irq = dec_interrupt[DEC_IRQ_LANCE]; |
1075 | esar_base = system_base + IOASIC_ESAR; | 1069 | esar_base = CKSEG1ADDR(dec_kn_slot_base + IOASIC_ESAR); |
1076 | 1070 | ||
1077 | /* Workaround crash with booting KN04 2.1k from Disk */ | 1071 | /* Workaround crash with booting KN04 2.1k from Disk */ |
1078 | memset((void *)dev->mem_start, 0, | 1072 | memset((void *)dev->mem_start, 0, |
@@ -1109,7 +1103,7 @@ static int __init dec_lance_init(const int type, const int slot) | |||
1109 | case PMAD_LANCE: | 1103 | case PMAD_LANCE: |
1110 | claim_tc_card(slot); | 1104 | claim_tc_card(slot); |
1111 | 1105 | ||
1112 | dev->mem_start = get_tc_base_addr(slot); | 1106 | dev->mem_start = CKSEG1ADDR(get_tc_base_addr(slot)); |
1113 | dev->base_addr = dev->mem_start + 0x100000; | 1107 | dev->base_addr = dev->mem_start + 0x100000; |
1114 | dev->irq = get_tc_irq_nr(slot); | 1108 | dev->irq = get_tc_irq_nr(slot); |
1115 | esar_base = dev->mem_start + 0x1c0002; | 1109 | esar_base = dev->mem_start + 0x1c0002; |
@@ -1138,9 +1132,9 @@ static int __init dec_lance_init(const int type, const int slot) | |||
1138 | 1132 | ||
1139 | case PMAX_LANCE: | 1133 | case PMAX_LANCE: |
1140 | dev->irq = dec_interrupt[DEC_IRQ_LANCE]; | 1134 | dev->irq = dec_interrupt[DEC_IRQ_LANCE]; |
1141 | dev->base_addr = KN01_LANCE_BASE; | 1135 | dev->base_addr = CKSEG1ADDR(KN01_SLOT_BASE + KN01_LANCE); |
1142 | dev->mem_start = KN01_LANCE_BASE + 0x01000000; | 1136 | dev->mem_start = CKSEG1ADDR(KN01_SLOT_BASE + KN01_LANCE_MEM); |
1143 | esar_base = KN01_RTC_BASE + 1; | 1137 | esar_base = CKSEG1ADDR(KN01_SLOT_BASE + KN01_ESAR + 1); |
1144 | lp->dma_irq = -1; | 1138 | lp->dma_irq = -1; |
1145 | 1139 | ||
1146 | /* | 1140 | /* |