Commit 3bd4c902da14030c9a780cd0c4be2ffe9aee2974

Authored by Maciej W. Rozycki
Committed by Ralf Baechle
1 parent 902d21d531

Deal with the bloody KSEG vs CKSEG horror...

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

Showing 10 changed files with 26 additions and 26 deletions Side-by-side Diff

arch/mips/dec/ecc-berr.c
... ... @@ -144,7 +144,8 @@
144 144 } else if (!sngl) {
145 145 status = dbestr;
146 146 } else {
147   - volatile u32 *ptr = (void *)KSEG1ADDR(address);
  147 + volatile u32 *ptr =
  148 + (void *)CKSEG1ADDR(address);
148 149  
149 150 *ptr = *ptr; /* Rewrite. */
150 151 iob();
arch/mips/dec/prom/memory.c
... ... @@ -35,22 +35,22 @@
35 35 extern char genexcept_early;
36 36  
37 37 /* Install exception handler */
38   - memcpy(&old_handler, (void *)(KSEG0 + 0x80), 0x80);
39   - memcpy((void *)(KSEG0 + 0x80), &genexcept_early, 0x80);
  38 + memcpy(&old_handler, (void *)(CKSEG0 + 0x80), 0x80);
  39 + memcpy((void *)(CKSEG0 + 0x80), &genexcept_early, 0x80);
40 40  
41 41 /* read unmapped and uncached (KSEG1)
42 42 * DECstations have at least 4MB RAM
43 43 * Assume less than 480MB of RAM, as this is max for 5000/2xx
44 44 * FIXME this should be replaced by the first free page!
45 45 */
46   - for (memory_page = (unsigned char *) KSEG1 + CHUNK_SIZE;
47   - (mem_err== 0) && (memory_page < ((unsigned char *) KSEG1+0x1E000000));
  46 + for (memory_page = (unsigned char *)CKSEG1 + CHUNK_SIZE;
  47 + mem_err == 0 && memory_page < (unsigned char *)CKSEG1 + 0x1e00000;
48 48 memory_page += CHUNK_SIZE) {
49 49 dummy = *memory_page;
50 50 }
51   - memcpy((void *)(KSEG0 + 0x80), &old_handler, 0x80);
  51 + memcpy((void *)(CKSEG0 + 0x80), &old_handler, 0x80);
52 52  
53   - add_memory_region(0, (unsigned long)memory_page - KSEG1 - CHUNK_SIZE,
  53 + add_memory_region(0, (unsigned long)memory_page - CKSEG1 - CHUNK_SIZE,
54 54 BOOT_MEM_RAM);
55 55 }
56 56  
... ... @@ -65,7 +65,7 @@
65 65 memmap *bm;
66 66  
67 67 /* some free 64k */
68   - bm = (memmap *)KSEG0ADDR(0x28000);
  68 + bm = (memmap *)CKSEG0ADDR(0x28000);
69 69  
70 70 bitmap_size = rex_getbitmap(bm);
71 71  
arch/mips/dec/reset.c
... ... @@ -14,7 +14,7 @@
14 14  
15 15 static inline void ATTRIB_NORET back_to_prom(void)
16 16 {
17   - noret_func_t func = (void *) KSEG1ADDR(0x1fc00000);
  17 + noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000);
18 18  
19 19 func();
20 20 }
... ... @@ -197,7 +197,7 @@
197 197 }
198 198  
199 199 info = (tcinfo *) rex_gettcinfo();
200   - slot0addr = (unsigned long)KSEG1ADDR(rex_slot_address(0));
  200 + slot0addr = (unsigned long)CKSEG1ADDR(rex_slot_address(0));
201 201  
202 202 switch (mips_machtype) {
203 203 case MACH_DS5000_200:
... ... @@ -245,7 +245,6 @@
245 245 tc_bus[i].name, tc_bus[i].firmware);
246 246 }
247 247 #endif
248   - ioport_resource.end = KSEG2 - 1;
249 248 }
250 249 }
251 250  
... ... @@ -1637,21 +1637,21 @@
1637 1637 #ifdef CONFIG_MACH_DECSTATION
1638 1638 case MACH_DS5000_2X0:
1639 1639 case MACH_DS5900:
1640   - system_base = KSEG1ADDR(0x1f800000);
  1640 + system_base = CKSEG1ADDR(0x1f800000);
1641 1641 n_chips = 2;
1642 1642 zs_parms = &ds_parms;
1643 1643 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0];
1644 1644 zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1];
1645 1645 break;
1646 1646 case MACH_DS5000_1XX:
1647   - system_base = KSEG1ADDR(0x1c000000);
  1647 + system_base = CKSEG1ADDR(0x1c000000);
1648 1648 n_chips = 2;
1649 1649 zs_parms = &ds_parms;
1650 1650 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0];
1651 1651 zs_parms->irq1 = dec_interrupt[DEC_IRQ_SCC1];
1652 1652 break;
1653 1653 case MACH_DS5000_XX:
1654   - system_base = KSEG1ADDR(0x1c000000);
  1654 + system_base = CKSEG1ADDR(0x1c000000);
1655 1655 n_chips = 1;
1656 1656 zs_parms = &ds_parms;
1657 1657 zs_parms->irq0 = dec_interrupt[DEC_IRQ_SCC0];
include/asm-mips/dec/kn01.h
... ... @@ -15,7 +15,7 @@
15 15  
16 16 #include <asm/addrspace.h>
17 17  
18   -#define KN01_SLOT_BASE KSEG1ADDR(0x10000000)
  18 +#define KN01_SLOT_BASE CKSEG1ADDR(0x10000000)
19 19 #define KN01_SLOT_SIZE 0x01000000
20 20  
21 21 /*
... ... @@ -51,7 +51,7 @@
51 51 /*
52 52 * Frame buffer memory address.
53 53 */
54   -#define KN01_VFB_MEM KSEG1ADDR(0x0fc00000)
  54 +#define KN01_VFB_MEM CKSEG1ADDR(0x0fc00000)
55 55  
56 56 /*
57 57 * CPU interrupt bits.
include/asm-mips/dec/kn02.h
... ... @@ -22,7 +22,7 @@
22 22 #include <asm/dec/ecc.h>
23 23  
24 24  
25   -#define KN02_SLOT_BASE KSEG1ADDR(0x1fc00000)
  25 +#define KN02_SLOT_BASE CKSEG1ADDR(0x1fc00000)
26 26 #define KN02_SLOT_SIZE 0x00080000
27 27  
28 28 /*
include/asm-mips/dec/kn02xa.h
... ... @@ -20,7 +20,7 @@
20 20 #include <asm/addrspace.h>
21 21 #include <asm/dec/ioasic_addrs.h>
22 22  
23   -#define KN02XA_SLOT_BASE KSEG1ADDR(0x1c000000)
  23 +#define KN02XA_SLOT_BASE CKSEG1ADDR(0x1c000000)
24 24  
25 25 /*
26 26 * Some port addresses...
27 27  
... ... @@ -32,16 +32,16 @@
32 32 /*
33 33 * Memory control ASIC registers.
34 34 */
35   -#define KN02XA_MER KSEG1ADDR(0x0c400000) /* memory error register */
36   -#define KN02XA_MSR KSEG1ADDR(0x0c800000) /* memory size register */
  35 +#define KN02XA_MER CKSEG1ADDR(0x0c400000) /* memory error register */
  36 +#define KN02XA_MSR CKSEG1ADDR(0x0c800000) /* memory size register */
37 37  
38 38 /*
39 39 * CPU control ASIC registers.
40 40 */
41   -#define KN02XA_MEM_CONF KSEG1ADDR(0x0e000000) /* write timeout config */
42   -#define KN02XA_EAR KSEG1ADDR(0x0e000004) /* error address register */
43   -#define KN02XA_BOOT0 KSEG1ADDR(0x0e000008) /* boot 0 register */
44   -#define KN02XA_MEM_INTR KSEG1ADDR(0x0e00000c) /* write err IRQ stat & ack */
  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 */
45 45  
46 46 /*
47 47 * Memory Error Register bits, common definitions.
include/asm-mips/dec/kn03.h
... ... @@ -19,7 +19,7 @@
19 19 #include <asm/dec/ecc.h>
20 20 #include <asm/dec/ioasic_addrs.h>
21 21  
22   -#define KN03_SLOT_BASE KSEG1ADDR(0x1f800000)
  22 +#define KN03_SLOT_BASE CKSEG1ADDR(0x1f800000)
23 23  
24 24 /*
25 25 * Some port addresses...
include/asm-mips/dec/prom.h
... ... @@ -24,7 +24,7 @@
24 24 * PMAX/3MAX PROM entry points for DS2100/3100's and DS5000/2xx's.
25 25 * Many of these will work for MIPSen as well!
26 26 */
27   -#define VEC_RESET (u64 *)KSEG1ADDR(0x1fc00000)
  27 +#define VEC_RESET (u64 *)CKSEG1ADDR(0x1fc00000)
28 28 /* Prom base address */
29 29  
30 30 #define PMAX_PROM_ENTRY(x) (VEC_RESET + (x)) /* Prom jump table */