Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Use physical addresses at the interface level, letting drivers remap them as appropriate.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Maciej W. Rozycki and committed by
Ralf Baechle
a5fc9c0b 7d7ee221

+152 -167
+7 -7
arch/mips/dec/ecc-berr.c
··· 227 227 */ 228 228 static inline void dec_kn02_be_init(void) 229 229 { 230 - volatile u32 *csr = (void *)KN02_CSR_BASE; 230 + volatile u32 *csr = (void *)CKSEG1ADDR(KN02_SLOT_BASE + KN02_CSR); 231 231 unsigned long flags; 232 232 233 - kn0x_erraddr = (void *)(KN02_SLOT_BASE + KN02_ERRADDR); 234 - kn0x_chksyn = (void *)(KN02_SLOT_BASE + KN02_CHKSYN); 233 + kn0x_erraddr = (void *)CKSEG1ADDR(KN02_SLOT_BASE + KN02_ERRADDR); 234 + kn0x_chksyn = (void *)CKSEG1ADDR(KN02_SLOT_BASE + KN02_CHKSYN); 235 235 236 236 spin_lock_irqsave(&kn02_lock, flags); 237 237 ··· 250 250 251 251 static inline void dec_kn03_be_init(void) 252 252 { 253 - volatile u32 *mcr = (void *)(KN03_SLOT_BASE + IOASIC_MCR); 254 - volatile u32 *mbcs = (void *)(KN4K_SLOT_BASE + KN4K_MB_CSR); 253 + volatile u32 *mcr = (void *)CKSEG1ADDR(KN03_SLOT_BASE + IOASIC_MCR); 254 + volatile u32 *mbcs = (void *)CKSEG1ADDR(KN4K_SLOT_BASE + KN4K_MB_CSR); 255 255 256 - kn0x_erraddr = (void *)(KN03_SLOT_BASE + IOASIC_ERRADDR); 257 - kn0x_chksyn = (void *)(KN03_SLOT_BASE + IOASIC_CHKSYN); 256 + kn0x_erraddr = (void *)CKSEG1ADDR(KN03_SLOT_BASE + IOASIC_ERRADDR); 257 + kn0x_chksyn = (void *)CKSEG1ADDR(KN03_SLOT_BASE + IOASIC_CHKSYN); 258 258 259 259 /* 260 260 * Set normal ECC detection and generation, enable ECC correction.
+13 -9
arch/mips/dec/int-handler.S
··· 2 2 * arch/mips/dec/int-handler.S 3 3 * 4 4 * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen 5 - * Copyright (C) 2000, 2001, 2002, 2003 Maciej W. Rozycki 5 + * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki 6 6 * 7 - * Written by Ralf Baechle and Andreas Busse, modified for DECStation 7 + * Written by Ralf Baechle and Andreas Busse, modified for DECstation 8 8 * support by Paul Antoine and Harald Koerfgen. 9 9 * 10 10 * completly rewritten: ··· 14 14 * by Maciej W. Rozycki. 15 15 */ 16 16 #include <linux/config.h> 17 - #include <asm/asm.h> 18 - #include <asm/regdef.h> 19 - #include <asm/mipsregs.h> 20 - #include <asm/stackframe.h> 17 + 21 18 #include <asm/addrspace.h> 19 + #include <asm/asm.h> 20 + #include <asm/mipsregs.h> 21 + #include <asm/regdef.h> 22 + #include <asm/stackframe.h> 22 23 23 24 #include <asm/dec/interrupts.h> 24 25 #include <asm/dec/ioasic_addrs.h> ··· 29 28 #include <asm/dec/kn02xa.h> 30 29 #include <asm/dec/kn03.h> 31 30 31 + #define KN02_CSR_BASE CKSEG1ADDR(KN02_SLOT_BASE + KN02_CSR) 32 + #define KN02XA_IOASIC_BASE CKSEG1ADDR(KN02XA_SLOT_BASE + IOASIC_IOCTL) 33 + #define KN03_IOASIC_BASE CKSEG1ADDR(KN03_SLOT_BASE + IOASIC_IOCTL) 32 34 33 35 .text 34 36 .set noreorder 35 37 /* 36 - * decstation_handle_int: Interrupt handler for DECStations 38 + * decstation_handle_int: Interrupt handler for DECstations 37 39 * 38 40 * We follow the model in the Indy interrupt code by David Miller, where he 39 41 * says: a lot of complication here is taken away because: ··· 52 48 * 3) Linux only thinks in terms of all IRQs on or all IRQs 53 49 * off, nothing in between like BSD spl() brain-damage. 54 50 * 55 - * Furthermore, the IRQs on the DECStations look basically (barring 51 + * Furthermore, the IRQs on the DECstations look basically (barring 56 52 * software IRQs which we don't use at all) like... 57 53 * 58 54 * DS2100/3100's, aka kn01, aka Pmax: ··· 65 61 * 3 Lance Ethernet 66 62 * 4 DZ11 serial 67 63 * 5 RTC 68 - * 6 Memory Controller 64 + * 6 Memory Controller & Video 69 65 * 7 FPU 70 66 * 71 67 * DS5000/200, aka kn02, aka 3max:
+5 -4
arch/mips/dec/kn01-berr.c
··· 51 51 52 52 static inline void dec_kn01_be_ack(void) 53 53 { 54 - volatile u16 *csr = (void *)(KN01_SLOT_BASE + KN01_CSR); 54 + volatile u16 *csr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + KN01_CSR); 55 55 unsigned long flags; 56 56 57 57 spin_lock_irqsave(&kn01_lock, flags); ··· 64 64 65 65 static int dec_kn01_be_backend(struct pt_regs *regs, int is_fixup, int invoker) 66 66 { 67 - volatile u32 *kn01_erraddr = (void *)(KN01_SLOT_BASE + KN01_ERRADDR); 67 + volatile u32 *kn01_erraddr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + 68 + KN01_ERRADDR); 68 69 69 70 static const char excstr[] = "exception"; 70 71 static const char intstr[] = "interrupt"; ··· 153 152 irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id, 154 153 struct pt_regs *regs) 155 154 { 156 - volatile u16 *csr = (void *)(KN01_SLOT_BASE + KN01_CSR); 155 + volatile u16 *csr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + KN01_CSR); 157 156 int action; 158 157 159 158 if (!(*csr & KN01_CSR_MEMERR)) ··· 179 178 180 179 void __init dec_kn01_be_init(void) 181 180 { 182 - volatile u16 *csr = (void *)(KN01_SLOT_BASE + KN01_CSR); 181 + volatile u16 *csr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + KN01_CSR); 183 182 unsigned long flags; 184 183 185 184 spin_lock_irqsave(&kn01_lock, flags);
+6 -3
arch/mips/dec/kn02-irq.c
··· 37 37 38 38 static inline void unmask_kn02_irq(unsigned int irq) 39 39 { 40 - volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE; 40 + volatile u32 *csr = (volatile u32 *)CKSEG1ADDR(KN02_SLOT_BASE + 41 + KN02_CSR); 41 42 42 43 cached_kn02_csr |= (1 << (irq - kn02_irq_base + 16)); 43 44 *csr = cached_kn02_csr; ··· 46 45 47 46 static inline void mask_kn02_irq(unsigned int irq) 48 47 { 49 - volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE; 48 + volatile u32 *csr = (volatile u32 *)CKSEG1ADDR(KN02_SLOT_BASE + 49 + KN02_CSR); 50 50 51 51 cached_kn02_csr &= ~(1 << (irq - kn02_irq_base + 16)); 52 52 *csr = cached_kn02_csr; ··· 107 105 108 106 void __init init_kn02_irqs(int base) 109 107 { 110 - volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE; 108 + volatile u32 *csr = (volatile u32 *)CKSEG1ADDR(KN02_SLOT_BASE + 109 + KN02_CSR); 111 110 unsigned long flags; 112 111 int i; 113 112
+6 -5
arch/mips/dec/kn02xa-berr.c
··· 20 20 #include <linux/kernel.h> 21 21 #include <linux/types.h> 22 22 23 + #include <asm/addrspace.h> 23 24 #include <asm/system.h> 24 25 #include <asm/traps.h> 25 26 ··· 30 29 31 30 static inline void dec_kn02xa_be_ack(void) 32 31 { 33 - volatile u32 *mer = (void *)KN02XA_MER; 34 - volatile u32 *mem_intr = (void *)KN02XA_MEM_INTR; 32 + volatile u32 *mer = (void *)CKSEG1ADDR(KN02XA_MER); 33 + volatile u32 *mem_intr = (void *)CKSEG1ADDR(KN02XA_MEM_INTR); 35 34 36 35 *mer = KN02CA_MER_INTR; /* Clear errors; keep the ARC IRQ. */ 37 36 *mem_intr = 0; /* Any write clears the bus IRQ. */ ··· 41 40 static int dec_kn02xa_be_backend(struct pt_regs *regs, int is_fixup, 42 41 int invoker) 43 42 { 44 - volatile u32 *kn02xa_mer = (void *)KN02XA_MER; 45 - volatile u32 *kn02xa_ear = (void *)KN02XA_EAR; 43 + volatile u32 *kn02xa_mer = (void *)CKSEG1ADDR(KN02XA_MER); 44 + volatile u32 *kn02xa_ear = (void *)CKSEG1ADDR(KN02XA_EAR); 46 45 47 46 static const char excstr[] = "exception"; 48 47 static const char intstr[] = "interrupt"; ··· 127 126 128 127 void __init dec_kn02xa_be_init(void) 129 128 { 130 - volatile u32 *mbcs = (void *)(KN4K_SLOT_BASE + KN4K_MB_CSR); 129 + volatile u32 *mbcs = (void *)CKSEG1ADDR(KN4K_SLOT_BASE + KN4K_MB_CSR); 131 130 132 131 /* For KN04 we need to make sure EE (?) is enabled in the MB. */ 133 132 if (current_cpu_data.cputype == CPU_R4000SC)
+20 -8
arch/mips/dec/prom/identify.c
··· 2 2 * identify.c: machine identification code. 3 3 * 4 4 * Copyright (C) 1998 Harald Koerfgen and Paul M. Antoine 5 - * Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki 5 + * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki 6 6 */ 7 7 #include <linux/init.h> 8 8 #include <linux/kernel.h> ··· 12 12 #include <linux/types.h> 13 13 14 14 #include <asm/bootinfo.h> 15 + 15 16 #include <asm/dec/ioasic.h> 16 17 #include <asm/dec/ioasic_addrs.h> 17 18 #include <asm/dec/kn01.h> ··· 22 21 #include <asm/dec/kn03.h> 23 22 #include <asm/dec/kn230.h> 24 23 #include <asm/dec/prom.h> 24 + #include <asm/dec/system.h> 25 25 26 26 #include "dectypes.h" 27 27 ··· 70 68 71 69 static inline void prom_init_kn01(void) 72 70 { 73 - dec_rtc_base = (void *)KN01_RTC_BASE; 71 + dec_kn_slot_base = KN01_SLOT_BASE; 74 72 dec_kn_slot_size = KN01_SLOT_SIZE; 73 + 74 + dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + KN01_RTC); 75 75 } 76 76 77 77 static inline void prom_init_kn230(void) 78 78 { 79 - dec_rtc_base = (void *)KN01_RTC_BASE; 79 + dec_kn_slot_base = KN01_SLOT_BASE; 80 80 dec_kn_slot_size = KN01_SLOT_SIZE; 81 + 82 + dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + KN01_RTC); 81 83 } 82 84 83 85 static inline void prom_init_kn02(void) 84 86 { 85 - dec_rtc_base = (void *)KN02_RTC_BASE; 87 + dec_kn_slot_base = KN02_SLOT_BASE; 86 88 dec_kn_slot_size = KN02_SLOT_SIZE; 89 + 90 + dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + KN02_RTC); 87 91 } 88 92 89 93 static inline void prom_init_kn02xa(void) 90 94 { 91 - ioasic_base = (void *)KN02XA_IOASIC_BASE; 92 - dec_rtc_base = (void *)KN02XA_RTC_BASE; 95 + dec_kn_slot_base = KN02XA_SLOT_BASE; 93 96 dec_kn_slot_size = IOASIC_SLOT_SIZE; 97 + 98 + ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL); 99 + dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY); 94 100 } 95 101 96 102 static inline void prom_init_kn03(void) 97 103 { 98 - ioasic_base = (void *)KN03_IOASIC_BASE; 99 - dec_rtc_base = (void *)KN03_RTC_BASE; 104 + dec_kn_slot_base = KN03_SLOT_BASE; 100 105 dec_kn_slot_size = IOASIC_SLOT_SIZE; 106 + 107 + ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL); 108 + dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY); 101 109 } 102 110 103 111
+11 -5
arch/mips/dec/setup.c
··· 39 39 #include <asm/dec/kn02ca.h> 40 40 #include <asm/dec/kn03.h> 41 41 #include <asm/dec/kn230.h> 42 + #include <asm/dec/system.h> 42 43 43 44 44 45 extern void dec_machine_restart(char *command); ··· 49 48 50 49 extern asmlinkage void decstation_handle_int(void); 51 50 51 + unsigned long dec_kn_slot_base, dec_kn_slot_size; 52 + 53 + EXPORT_SYMBOL(dec_kn_slot_base); 54 + EXPORT_SYMBOL(dec_kn_slot_size); 55 + 52 56 spinlock_t ioasic_ssr_lock; 53 57 54 58 volatile u32 *ioasic_base; 55 - unsigned long dec_kn_slot_size; 59 + 60 + EXPORT_SYMBOL(ioasic_base); 56 61 57 62 /* 58 63 * IRQ routing and priority tables. Priorites are set as follows: ··· 85 78 int dec_interrupt[DEC_NR_INTS] = { 86 79 [0 ... DEC_NR_INTS - 1] = -1 87 80 }; 81 + 82 + EXPORT_SYMBOL(dec_interrupt); 83 + 88 84 int_ptr cpu_mask_nr_tbl[DEC_MAX_CPU_INTS][2] = { 89 85 { { .i = ~0 }, { .p = dec_intr_unimplemented } }, 90 86 }; ··· 765 755 if (dec_interrupt[DEC_IRQ_HALT] >= 0) 766 756 setup_irq(dec_interrupt[DEC_IRQ_HALT], &haltirq); 767 757 } 768 - 769 - EXPORT_SYMBOL(ioasic_base); 770 - EXPORT_SYMBOL(dec_kn_slot_size); 771 - EXPORT_SYMBOL(dec_interrupt);
+37 -43
drivers/tc/tc.c
··· 10 10 * Copyright (c) Harald Koerfgen, 1998 11 11 * Copyright (c) 2001, 2003, 2005 Maciej W. Rozycki 12 12 */ 13 - #include <linux/string.h> 14 13 #include <linux/init.h> 15 - #include <linux/ioport.h> 16 14 #include <linux/kernel.h> 17 15 #include <linux/module.h> 16 + #include <linux/string.h> 17 + #include <linux/types.h> 18 18 19 19 #include <asm/addrspace.h> 20 + #include <asm/bug.h> 20 21 #include <asm/errno.h> 22 + #include <asm/io.h> 23 + #include <asm/paccess.h> 24 + 21 25 #include <asm/dec/machtype.h> 22 26 #include <asm/dec/prom.h> 23 27 #include <asm/dec/tcinfo.h> 24 28 #include <asm/dec/tcmodule.h> 25 29 #include <asm/dec/interrupts.h> 26 - #include <asm/paccess.h> 27 - #include <asm/ptrace.h> 28 - 29 - #define TC_DEBUG 30 30 31 31 MODULE_LICENSE("GPL"); 32 32 slot_info tc_bus[MAX_SLOT]; 33 33 static int num_tcslots; 34 34 static tcinfo *info; 35 - 36 - unsigned long system_base; 37 35 38 36 /* 39 37 * Interface to the world. Read comment in include/asm-mips/tc.h. ··· 95 97 static void __init tc_probe(unsigned long startaddr, unsigned long size, 96 98 int slots) 97 99 { 100 + unsigned long slotaddr; 98 101 int i, slot, err; 99 102 long offset; 100 - unsigned char pattern[4]; 101 - unsigned char *module; 103 + u8 pattern[4]; 104 + volatile u8 *module; 102 105 103 106 for (slot = 0; slot < slots; slot++) { 104 - module = (char *)(startaddr + slot * size); 107 + slotaddr = startaddr + slot * size; 108 + module = ioremap_nocache(slotaddr, size); 109 + BUG_ON(!module); 105 110 106 111 offset = OLDCARD; 107 112 ··· 113 112 err |= get_dbe(pattern[1], module + OLDCARD + TC_PATTERN1); 114 113 err |= get_dbe(pattern[2], module + OLDCARD + TC_PATTERN2); 115 114 err |= get_dbe(pattern[3], module + OLDCARD + TC_PATTERN3); 116 - if (err) 115 + if (err) { 116 + iounmap(module); 117 117 continue; 118 + } 118 119 119 120 if (pattern[0] != 0x55 || pattern[1] != 0x00 || 120 121 pattern[2] != 0xaa || pattern[3] != 0xff) { ··· 127 124 err |= get_dbe(pattern[1], module + TC_PATTERN1); 128 125 err |= get_dbe(pattern[2], module + TC_PATTERN2); 129 126 err |= get_dbe(pattern[3], module + TC_PATTERN3); 130 - if (err) 127 + if (err) { 128 + iounmap(module); 131 129 continue; 130 + } 132 131 } 133 132 134 133 if (pattern[0] != 0x55 || pattern[1] != 0x00 || 135 - pattern[2] != 0xaa || pattern[3] != 0xff) 134 + pattern[2] != 0xaa || pattern[3] != 0xff) { 135 + iounmap(module); 136 136 continue; 137 + } 137 138 138 - tc_bus[slot].base_addr = (unsigned long)module; 139 - for(i = 0; i < 8; i++) { 139 + tc_bus[slot].base_addr = slotaddr; 140 + for (i = 0; i < 8; i++) { 140 141 tc_bus[slot].firmware[i] = 141 142 module[TC_FIRM_VER + offset + 4 * i]; 142 143 tc_bus[slot].vendor[i] = ··· 178 171 tc_bus[slot].interrupt = -1; 179 172 break; 180 173 } 174 + 175 + iounmap(module); 181 176 } 182 177 } 183 178 ··· 205 196 tc_bus[i].flags = FREE; 206 197 } 207 198 208 - info = (tcinfo *) rex_gettcinfo(); 209 - slot0addr = (unsigned long)CKSEG1ADDR(rex_slot_address(0)); 199 + info = rex_gettcinfo(); 200 + slot0addr = CPHYSADDR((long)rex_slot_address(0)); 210 201 211 202 switch (mips_machtype) { 212 203 case MACH_DS5000_200: ··· 225 216 226 217 tc_clock = 10000 / info->clk_period; 227 218 228 - if (TURBOCHANNEL && info->slot_size && slot0addr) { 229 - printk("TURBOchannel rev. %1d at %2d.%1d MHz ", info->revision, 230 - tc_clock / 10, tc_clock % 10); 231 - printk("(with%s parity)\n", info->parity ? "" : "out"); 219 + if (info->slot_size && slot0addr) { 220 + pr_info("TURBOchannel rev. %d at %d.%d MHz (with%s parity)\n", 221 + info->revision, tc_clock / 10, tc_clock % 10, 222 + info->parity ? "" : "out"); 232 223 233 224 slot_size = info->slot_size << 20; 234 225 235 226 tc_probe(slot0addr, slot_size, num_tcslots); 236 227 237 - /* 238 - * All TURBOchannel DECstations have the onboard devices 239 - * where the (num_tcslots + 0 or 1 on DS5k/xx) Option Module 240 - * would be. 241 - */ 242 - if(mips_machtype == MACH_DS5000_XX) 243 - i = 1; 244 - else 245 - i = 0; 246 - 247 - system_base = slot0addr + slot_size * (num_tcslots + i); 248 - 249 - #ifdef TC_DEBUG 250 - for (i = 0; i < num_tcslots; i++) 251 - if (tc_bus[i].base_addr) { 252 - printk(" slot %d: ", i); 253 - printk("%s %s %s\n", tc_bus[i].vendor, 254 - tc_bus[i].name, tc_bus[i].firmware); 255 - } 256 - #endif 228 + for (i = 0; i < num_tcslots; i++) { 229 + if (!tc_bus[i].base_addr) 230 + continue; 231 + pr_info(" slot %d: %s %s %s\n", i, tc_bus[i].vendor, 232 + tc_bus[i].name, tc_bus[i].firmware); 233 + } 257 234 } 258 235 259 236 return 0; ··· 253 258 EXPORT_SYMBOL(get_tc_base_addr); 254 259 EXPORT_SYMBOL(get_tc_irq_nr); 255 260 EXPORT_SYMBOL(get_tc_speed); 256 - EXPORT_SYMBOL(system_base);
+7 -15
drivers/tc/zs.c
··· 65 65 #include <asm/system.h> 66 66 #include <asm/uaccess.h> 67 67 #include <asm/bootinfo.h> 68 - #include <asm/dec/serial.h> 69 68 70 - #ifdef CONFIG_MACH_DECSTATION 71 69 #include <asm/dec/interrupts.h> 72 - #include <asm/dec/machtype.h> 73 - #include <asm/dec/tc.h> 74 70 #include <asm/dec/ioasic_addrs.h> 75 - #endif 71 + #include <asm/dec/machtype.h> 72 + #include <asm/dec/serial.h> 73 + #include <asm/dec/system.h> 74 + #include <asm/dec/tc.h> 75 + 76 76 #ifdef CONFIG_KGDB 77 77 #include <asm/kgdb.h> 78 78 #endif ··· 1616 1616 return; 1617 1617 } 1618 1618 1619 - /* 1620 - * When serial console is activated, tc_init has not been called yet 1621 - * and system_base is undefined. Unfortunately we have to hardcode 1622 - * system_base for this case :-(. HK 1623 - */ 1624 1619 switch(mips_machtype) { 1625 1620 #ifdef CONFIG_MACH_DECSTATION 1626 1621 case MACH_DS5000_2X0: 1627 1622 case MACH_DS5900: 1628 - system_base = CKSEG1ADDR(0x1f800000); 1629 1623 n_chips = 2; 1630 1624 zs_parms = &ds_parms; 1631 1625 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; 1632 1626 zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; 1633 1627 break; 1634 1628 case MACH_DS5000_1XX: 1635 - system_base = CKSEG1ADDR(0x1c000000); 1636 1629 n_chips = 2; 1637 1630 zs_parms = &ds_parms; 1638 1631 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; 1639 1632 zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1]; 1640 1633 break; 1641 1634 case MACH_DS5000_XX: 1642 - system_base = CKSEG1ADDR(0x1c000000); 1643 1635 n_chips = 1; 1644 1636 zs_parms = &ds_parms; 1645 1637 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0]; ··· 1653 1661 * The sccs reside on the high byte of the 16 bit IOBUS 1654 1662 */ 1655 1663 zs_channels[n_channels].control = 1656 - (volatile unsigned char *)system_base + 1664 + (volatile void *)CKSEG1ADDR(dec_kn_slot_base + 1657 1665 (0 == chip ? zs_parms->scc0 : zs_parms->scc1) + 1658 1666 (0 == channel ? zs_parms->channel_a_offset : 1659 - zs_parms->channel_b_offset); 1667 + zs_parms->channel_b_offset)); 1660 1668 zs_channels[n_channels].data = 1661 1669 zs_channels[n_channels].control + 4; 1662 1670
+2 -1
include/asm-mips/dec/ioasic_addrs.h
··· 45 45 46 46 47 47 /* 48 - * Offsets for I/O ASIC registers (relative to (system_base + IOASIC_IOCTL)). 48 + * Offsets for I/O ASIC registers 49 + * (relative to (dec_kn_slot_base + IOASIC_IOCTL)). 49 50 */ 50 51 /* all systems */ 51 52 #define IO_REG_SCSI_DMA_P 0x00 /* SCSI DMA Pointer */
+2 -12
include/asm-mips/dec/kn01.h
··· 13 13 #ifndef __ASM_MIPS_DEC_KN01_H 14 14 #define __ASM_MIPS_DEC_KN01_H 15 15 16 - #include <asm/addrspace.h> 17 - 18 - #define KN01_SLOT_BASE CKSEG1ADDR(0x10000000) 16 + #define KN01_SLOT_BASE 0x10000000 19 17 #define KN01_SLOT_SIZE 0x01000000 20 18 21 19 /* ··· 39 41 40 42 41 43 /* 42 - * Some port addresses... 43 - */ 44 - #define KN01_LANCE_BASE (KN01_SLOT_BASE + KN01_LANCE) /* 0xB8000000 */ 45 - #define KN01_DZ11_BASE (KN01_SLOT_BASE + KN01_DZ11) /* 0xBC000000 */ 46 - #define KN01_RTC_BASE (KN01_SLOT_BASE + KN01_RTC) /* 0xBD000000 */ 47 - 48 - 49 - /* 50 44 * Frame buffer memory address. 51 45 */ 52 - #define KN01_VFB_MEM CKSEG1ADDR(0x0fc00000) 46 + #define KN01_VFB_MEM 0x0fc00000 53 47 54 48 /* 55 49 * CPU interrupt bits.
+1 -13
include/asm-mips/dec/kn02.h
··· 13 13 #ifndef __ASM_MIPS_DEC_KN02_H 14 14 #define __ASM_MIPS_DEC_KN02_H 15 15 16 - #include <asm/addrspace.h> 17 - #include <asm/dec/ecc.h> 18 - 19 - 20 - #define KN02_SLOT_BASE CKSEG1ADDR(0x1fc00000) 16 + #define KN02_SLOT_BASE 0x1fc00000 21 17 #define KN02_SLOT_SIZE 0x00080000 22 18 23 19 /* ··· 27 31 #define KN02_RTC (5*KN02_SLOT_SIZE) /* DS1287 RTC */ 28 32 #define KN02_CSR (6*KN02_SLOT_SIZE) /* system ctrl & status reg */ 29 33 #define KN02_SYS_ROM_7 (7*KN02_SLOT_SIZE) /* system board ROM (alias) */ 30 - 31 - 32 - /* 33 - * Some port addresses... 34 - */ 35 - #define KN02_DZ11_BASE (KN02_SLOT_BASE + KN02_DZ11) /* DZ11 */ 36 - #define KN02_RTC_BASE (KN02_SLOT_BASE + KN02_RTC) /* RTC */ 37 - #define KN02_CSR_BASE (KN02_SLOT_BASE + KN02_CSR) /* CSR */ 38 34 39 35 40 36 /*
+7 -15
include/asm-mips/dec/kn02xa.h
··· 17 17 #ifndef __ASM_MIPS_DEC_KN02XA_H 18 18 #define __ASM_MIPS_DEC_KN02XA_H 19 19 20 - #include <asm/addrspace.h> 21 20 #include <asm/dec/ioasic_addrs.h> 22 21 23 - #define KN02XA_SLOT_BASE CKSEG1ADDR(0x1c000000) 24 - 25 - /* 26 - * Some port addresses... 27 - */ 28 - #define KN02XA_IOASIC_BASE (KN02XA_SLOT_BASE + IOASIC_IOCTL) /* I/O ASIC */ 29 - #define KN02XA_RTC_BASE (KN02XA_SLOT_BASE + IOASIC_TOY) /* RTC */ 30 - 22 + #define KN02XA_SLOT_BASE 0x1c000000 31 23 32 24 /* 33 25 * Memory control ASIC registers. 34 26 */ 35 - #define KN02XA_MER CKSEG1ADDR(0x0c400000) /* memory error register */ 36 - #define KN02XA_MSR CKSEG1ADDR(0x0c800000) /* memory size register */ 27 + #define KN02XA_MER 0x0c400000 /* memory error register */ 28 + #define KN02XA_MSR 0x0c800000 /* memory size register */ 37 29 38 30 /* 39 31 * CPU control ASIC registers. 40 32 */ 41 - #define KN02XA_MEM_CONF CKSEG1ADDR(0x0e000000) /* write timeout config */ 42 - #define KN02XA_EAR CKSEG1ADDR(0x0e000004) /* error address register */ 43 - #define KN02XA_BOOT0 CKSEG1ADDR(0x0e000008) /* boot 0 register */ 44 - #define KN02XA_MEM_INTR CKSEG1ADDR(0x0e00000c) /* write err IRQ stat & ack */ 33 + #define KN02XA_MEM_CONF 0x0e000000 /* write timeout config */ 34 + #define KN02XA_EAR 0x0e000004 /* error address register */ 35 + #define KN02XA_BOOT0 0x0e000008 /* boot 0 register */ 36 + #define KN02XA_MEM_INTR 0x0e00000c /* write err IRQ stat & ack */ 45 37 46 38 /* 47 39 * Memory Error Register bits, common definitions.
+2 -11
include/asm-mips/dec/kn03.h
··· 10 10 * 11 11 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 12 12 * are by courtesy of Chris Fraser. 13 - * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki 13 + * Copyright (C) 2000, 2002, 2003, 2005 Maciej W. Rozycki 14 14 */ 15 15 #ifndef __ASM_MIPS_DEC_KN03_H 16 16 #define __ASM_MIPS_DEC_KN03_H 17 17 18 - #include <asm/addrspace.h> 19 18 #include <asm/dec/ecc.h> 20 19 #include <asm/dec/ioasic_addrs.h> 21 20 22 - #define KN03_SLOT_BASE CKSEG1ADDR(0x1f800000) 23 - 24 - /* 25 - * Some port addresses... 26 - */ 27 - #define KN03_IOASIC_BASE (KN03_SLOT_BASE + IOASIC_IOCTL) /* I/O ASIC */ 28 - #define KN03_RTC_BASE (KN03_SLOT_BASE + IOASIC_TOY) /* RTC */ 29 - #define KN03_MCR_BASE (KN03_SLOT_BASE + IOASIC_MCR) /* MCR */ 30 - 21 + #define KN03_SLOT_BASE 0x1f800000 31 22 32 23 /* 33 24 * CPU interrupt bits.
+1 -2
include/asm-mips/dec/kn05.h
··· 21 21 #ifndef __ASM_MIPS_DEC_KN05_H 22 22 #define __ASM_MIPS_DEC_KN05_H 23 23 24 - #include <asm/addrspace.h> 25 24 #include <asm/dec/ioasic_addrs.h> 26 25 27 26 /* ··· 29 30 * passed to the I/O ASIC's decoder like with the KN03 or KN02-BA/CA. 30 31 * Others are handled locally. "Low" slots are always passed. 31 32 */ 32 - #define KN4K_SLOT_BASE KSEG1ADDR(0x1fc00000) 33 + #define KN4K_SLOT_BASE 0x1fc00000 33 34 34 35 #define KN4K_MB_ROM (0*IOASIC_SLOT_SIZE) /* KN05/KN04 card ROM */ 35 36 #define KN4K_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */
+18
include/asm-mips/dec/system.h
··· 1 + /* 2 + * include/asm-mips/dec/system.h 3 + * 4 + * Generic DECstation/DECsystem bits. 5 + * 6 + * Copyright (C) 2005 Maciej W. Rozycki 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public License 10 + * as published by the Free Software Foundation; either version 11 + * 2 of the License, or (at your option) any later version. 12 + */ 13 + #ifndef __ASM_DEC_SYSTEM_H 14 + #define __ASM_DEC_SYSTEM_H 15 + 16 + extern unsigned long dec_kn_slot_base, dec_kn_slot_size; 17 + 18 + #endif /* __ASM_DEC_SYSTEM_H */
+4 -6
include/asm-mips/dec/tc.h
··· 7 7 * 8 8 * Copyright (c) 1998 Harald Koerfgen 9 9 */ 10 - #ifndef ASM_TC_H 11 - #define ASM_TC_H 12 - 13 - extern unsigned long system_base; 10 + #ifndef __ASM_DEC_TC_H 11 + #define __ASM_DEC_TC_H 14 12 15 13 /* 16 14 * Search for a TURBOchannel Option Module ··· 34 36 */ 35 37 extern unsigned long get_tc_irq_nr(int); 36 38 /* 37 - * Return TURBOchannel clock frequency in hz 39 + * Return TURBOchannel clock frequency in Hz 38 40 */ 39 41 extern unsigned long get_tc_speed(void); 40 42 41 - #endif 43 + #endif /* __ASM_DEC_TC_H */
+3 -8
include/asm-mips/mach-dec/mc146818rtc.h
··· 3 3 * 4 4 * Copyright (C) 1998, 2001 by Ralf Baechle 5 5 * Copyright (C) 1998 by Harald Koerfgen 6 - * Copyright (C) 2002 Maciej W. Rozycki 6 + * Copyright (C) 2002, 2005 Maciej W. Rozycki 7 7 * 8 8 * This program is free software; you can redistribute it and/or 9 9 * modify it under the terms of the GNU General Public License ··· 14 14 #define __ASM_MIPS_DEC_RTC_DEC_H 15 15 16 16 #include <linux/types.h> 17 - 18 17 #include <asm/addrspace.h> 18 + #include <asm/dec/system.h> 19 19 20 20 extern volatile u8 *dec_rtc_base; 21 - extern unsigned long dec_kn_slot_size; 22 21 23 - #define RTC_PORT(x) CPHYSADDR(dec_rtc_base) 22 + #define RTC_PORT(x) CPHYSADDR((long)dec_rtc_base) 24 23 #define RTC_IO_EXTENT dec_kn_slot_size 25 24 #define RTC_IOMAPPED 0 26 25 #undef RTC_IRQ 27 26 28 27 #define RTC_DEC_YEAR 0x3f /* Where we store the real year on DECs. */ 29 - 30 - #include <linux/mc146818rtc.h> 31 - #include <linux/module.h> 32 - #include <linux/types.h> 33 28 34 29 static inline unsigned char CMOS_READ(unsigned long addr) 35 30 {