Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Fix builds where MSC01E_xxx is undefined.
[MIPS] Separate performance counter interrupts
[MIPS] Malta: Fix for SOCitSC based Maltas

+222 -107
+6 -6
arch/mips/kernel/smp-mt.c
··· 129 129 130 130 static struct irqaction irq_resched = { 131 131 .handler = ipi_resched_interrupt, 132 - .flags = IRQF_DISABLED, 132 + .flags = IRQF_DISABLED|IRQF_PERCPU, 133 133 .name = "IPI_resched" 134 134 }; 135 135 136 136 static struct irqaction irq_call = { 137 137 .handler = ipi_call_interrupt, 138 - .flags = IRQF_DISABLED, 138 + .flags = IRQF_DISABLED|IRQF_PERCPU, 139 139 .name = "IPI_call" 140 140 }; 141 141 ··· 275 275 setup_irq(cpu_ipi_resched_irq, &irq_resched); 276 276 setup_irq(cpu_ipi_call_irq, &irq_call); 277 277 278 - /* need to mark IPI's as IRQ_PER_CPU */ 279 - irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU; 280 278 set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); 281 - irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU; 282 279 set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq); 283 280 } 284 281 ··· 323 326 324 327 void prom_init_secondary(void) 325 328 { 329 + /* Enable per-cpu interrupts */ 330 + 331 + /* This is Malta specific: IPI,performance and timer inetrrupts */ 326 332 write_c0_status((read_c0_status() & ~ST0_IM ) | 327 - (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP7)); 333 + (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7)); 328 334 } 329 335 330 336 void prom_smp_finish(void)
+31 -13
arch/mips/kernel/time.c
··· 199 199 EXPORT_SYMBOL(null_perf_irq); 200 200 EXPORT_SYMBOL(perf_irq); 201 201 202 + /* 203 + * Performance counter IRQ or -1 if shared with timer 204 + */ 205 + int mipsxx_perfcount_irq; 206 + EXPORT_SYMBOL(mipsxx_perfcount_irq); 207 + 208 + /* 209 + * Possibly handle a performance counter interrupt. 210 + * Return true if the timer interrupt should not be checked 211 + */ 212 + static inline int handle_perf_irq (int r2) 213 + { 214 + /* 215 + * The performance counter overflow interrupt may be shared with the 216 + * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a 217 + * performance counter has overflowed (perf_irq() == IRQ_HANDLED) 218 + * and we can't reliably determine if a counter interrupt has also 219 + * happened (!r2) then don't check for a timer interrupt. 220 + */ 221 + return (mipsxx_perfcount_irq < 0) && 222 + perf_irq() == IRQ_HANDLED && 223 + !r2; 224 + } 225 + 202 226 asmlinkage void ll_timer_interrupt(int irq) 203 227 { 204 228 int r2 = cpu_has_mips_r2; ··· 230 206 irq_enter(); 231 207 kstat_this_cpu.irqs[irq]++; 232 208 233 - /* 234 - * Suckage alert: 235 - * Before R2 of the architecture there was no way to see if a 236 - * performance counter interrupt was pending, so we have to run the 237 - * performance counter interrupt handler anyway. 238 - */ 239 - if (!r2 || (read_c0_cause() & (1 << 26))) 240 - if (perf_irq()) 241 - goto out; 209 + if (handle_perf_irq(r2)) 210 + goto out; 242 211 243 - /* we keep interrupt disabled all the time */ 244 - if (!r2 || (read_c0_cause() & (1 << 30))) 245 - timer_interrupt(irq, NULL); 212 + if (r2 && ((read_c0_cause() & (1 << 30)) == 0)) 213 + goto out; 214 + 215 + timer_interrupt(irq, NULL); 246 216 247 217 out: 248 218 irq_exit(); ··· 276 258 277 259 static struct irqaction timer_irqaction = { 278 260 .handler = timer_interrupt, 279 - .flags = IRQF_DISABLED, 261 + .flags = IRQF_DISABLED | IRQF_PERCPU, 280 262 .name = "timer", 281 263 }; 282 264
+44 -18
arch/mips/mips-boards/generic/init.c
··· 57 57 58 58 int init_debug = 0; 59 59 60 - unsigned int mips_revision_corid; 60 + int mips_revision_corid; 61 + int mips_revision_sconid; 61 62 62 63 /* Bonito64 system controller register base. */ 63 64 unsigned long _pcictrl_bonito; ··· 276 275 else 277 276 mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; 278 277 } 279 - switch(mips_revision_corid) { 278 + 279 + mips_revision_sconid = MIPS_REVISION_SCONID; 280 + if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) { 281 + switch (mips_revision_corid) { 282 + case MIPS_REVISION_CORID_QED_RM5261: 283 + case MIPS_REVISION_CORID_CORE_LV: 284 + case MIPS_REVISION_CORID_CORE_FPGA: 285 + case MIPS_REVISION_CORID_CORE_FPGAR2: 286 + mips_revision_sconid = MIPS_REVISION_SCON_GT64120; 287 + break; 288 + case MIPS_REVISION_CORID_CORE_EMUL_BON: 289 + case MIPS_REVISION_CORID_BONITO64: 290 + case MIPS_REVISION_CORID_CORE_20K: 291 + mips_revision_sconid = MIPS_REVISION_SCON_BONITO; 292 + break; 293 + case MIPS_REVISION_CORID_CORE_MSC: 294 + case MIPS_REVISION_CORID_CORE_FPGA2: 295 + case MIPS_REVISION_CORID_CORE_FPGA3: 296 + case MIPS_REVISION_CORID_CORE_24K: 297 + case MIPS_REVISION_CORID_CORE_EMUL_MSC: 298 + mips_revision_sconid = MIPS_REVISION_SCON_SOCIT; 299 + break; 300 + default: 301 + mips_display_message("CC Error"); 302 + while (1); /* We die here... */ 303 + } 304 + } 305 + 306 + switch (mips_revision_sconid) { 280 307 u32 start, map, mask, data; 281 308 282 - case MIPS_REVISION_CORID_QED_RM5261: 283 - case MIPS_REVISION_CORID_CORE_LV: 284 - case MIPS_REVISION_CORID_CORE_FPGA: 285 - case MIPS_REVISION_CORID_CORE_FPGAR2: 309 + case MIPS_REVISION_SCON_GT64120: 286 310 /* 287 311 * Setup the North bridge to do Master byte-lane swapping 288 312 * when running in bigendian. ··· 331 305 set_io_port_base(MALTA_GT_PORT_BASE); 332 306 break; 333 307 334 - case MIPS_REVISION_CORID_CORE_EMUL_BON: 335 - case MIPS_REVISION_CORID_BONITO64: 336 - case MIPS_REVISION_CORID_CORE_20K: 308 + case MIPS_REVISION_SCON_BONITO: 337 309 _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); 338 310 339 311 /* ··· 358 334 set_io_port_base(MALTA_BONITO_PORT_BASE); 359 335 break; 360 336 361 - case MIPS_REVISION_CORID_CORE_MSC: 362 - case MIPS_REVISION_CORID_CORE_FPGA2: 363 - case MIPS_REVISION_CORID_CORE_FPGA3: 364 - case MIPS_REVISION_CORID_CORE_24K: 365 - case MIPS_REVISION_CORID_CORE_EMUL_MSC: 337 + case MIPS_REVISION_SCON_SOCIT: 338 + case MIPS_REVISION_SCON_ROCIT: 366 339 _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); 367 - 340 + mips_pci_controller: 368 341 mb(); 369 342 MSC_READ(MSC01_PCI_CFG, data); 370 343 MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); ··· 395 374 set_io_port_base(MALTA_MSC_PORT_BASE); 396 375 break; 397 376 377 + case MIPS_REVISION_SCON_SOCITSC: 378 + case MIPS_REVISION_SCON_SOCITSCP: 379 + _pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000); 380 + goto mips_pci_controller; 381 + 398 382 default: 399 - /* Unknown Core card */ 400 - mips_display_message("CC Error"); 401 - while(1); /* We die here... */ 383 + /* Unknown system controller */ 384 + mips_display_message("SC Error"); 385 + while (1); /* We die here... */ 402 386 } 403 387 #endif 404 388 board_nmi_handler_setup = mips_nmi_setup;
+7 -13
arch/mips/mips-boards/generic/pci.c
··· 92 92 struct pci_controller *controller; 93 93 resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; 94 94 95 - switch (mips_revision_corid) { 96 - case MIPS_REVISION_CORID_QED_RM5261: 97 - case MIPS_REVISION_CORID_CORE_LV: 98 - case MIPS_REVISION_CORID_CORE_FPGA: 99 - case MIPS_REVISION_CORID_CORE_FPGAR2: 95 + switch (mips_revision_sconid) { 96 + case MIPS_REVISION_SCON_GT64120: 100 97 /* 101 98 * Due to a bug in the Galileo system controller, we need 102 99 * to setup the PCI BAR for the Galileo internal registers. ··· 158 161 controller = &gt64120_controller; 159 162 break; 160 163 161 - case MIPS_REVISION_CORID_BONITO64: 162 - case MIPS_REVISION_CORID_CORE_20K: 163 - case MIPS_REVISION_CORID_CORE_EMUL_BON: 164 + case MIPS_REVISION_SCON_BONITO: 164 165 /* Set up resource ranges from the controller's registers. */ 165 166 map = BONITO_PCIMAP; 166 167 map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >> ··· 190 195 controller = &bonito64_controller; 191 196 break; 192 197 193 - case MIPS_REVISION_CORID_CORE_MSC: 194 - case MIPS_REVISION_CORID_CORE_FPGA2: 195 - case MIPS_REVISION_CORID_CORE_FPGA3: 196 - case MIPS_REVISION_CORID_CORE_24K: 197 - case MIPS_REVISION_CORID_CORE_EMUL_MSC: 198 + case MIPS_REVISION_SCON_SOCIT: 199 + case MIPS_REVISION_SCON_ROCIT: 200 + case MIPS_REVISION_SCON_SOCITSC: 201 + case MIPS_REVISION_SCON_SOCITSCP: 198 202 /* Set up resource ranges from the controller's registers. */ 199 203 MSC_READ(MSC01_PCI_SC2PMBASL, start); 200 204 MSC_READ(MSC01_PCI_SC2PMMSKL, mask);
+93 -22
arch/mips/mips-boards/generic/time.c
··· 53 53 54 54 unsigned long cpu_khz; 55 55 56 - #define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) 57 - 58 56 static int mips_cpu_timer_irq; 57 + extern int mipsxx_perfcount_irq; 59 58 extern void smtc_timer_broadcast(int); 60 59 61 60 static void mips_timer_dispatch(void) 62 61 { 63 62 do_IRQ(mips_cpu_timer_irq); 63 + } 64 + 65 + static void mips_perf_dispatch(void) 66 + { 67 + do_IRQ(mipsxx_perfcount_irq); 64 68 } 65 69 66 70 /* ··· 73 69 extern int null_perf_irq(void); 74 70 75 71 extern int (*perf_irq)(void); 72 + 73 + /* 74 + * Possibly handle a performance counter interrupt. 75 + * Return true if the timer interrupt should not be checked 76 + */ 77 + static inline int handle_perf_irq (int r2) 78 + { 79 + /* 80 + * The performance counter overflow interrupt may be shared with the 81 + * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a 82 + * performance counter has overflowed (perf_irq() == IRQ_HANDLED) 83 + * and we can't reliably determine if a counter interrupt has also 84 + * happened (!r2) then don't check for a timer interrupt. 85 + */ 86 + return (mipsxx_perfcount_irq < 0) && 87 + perf_irq() == IRQ_HANDLED && 88 + !r2; 89 + } 76 90 77 91 irqreturn_t mips_timer_interrupt(int irq, void *dev_id) 78 92 { ··· 114 92 * We could be here due to timer interrupt, 115 93 * perf counter overflow, or both. 116 94 */ 117 - if (read_c0_cause() & (1 << 26)) 118 - perf_irq(); 95 + (void) handle_perf_irq(1); 119 96 120 97 if (read_c0_cause() & (1 << 30)) { 121 98 /* ··· 136 115 #else /* CONFIG_MIPS_MT_SMTC */ 137 116 int r2 = cpu_has_mips_r2; 138 117 118 + if (handle_perf_irq(r2)) 119 + goto out; 120 + 121 + if (r2 && ((read_c0_cause() & (1 << 30)) == 0)) 122 + goto out; 123 + 139 124 if (cpu == 0) { 140 125 /* 141 126 * CPU 0 handles the global timer interrupt job and process 142 127 * accounting resets count/compare registers to trigger next 143 128 * timer int. 144 129 */ 145 - if (!r2 || (read_c0_cause() & (1 << 26))) 146 - if (perf_irq()) 147 - goto out; 148 - 149 - /* we keep interrupt disabled all the time */ 150 - if (!r2 || (read_c0_cause() & (1 << 30))) 151 - timer_interrupt(irq, NULL); 130 + timer_interrupt(irq, NULL); 152 131 } else { 153 132 /* Everyone else needs to reset the timer int here as 154 133 ll_local_timer_interrupt doesn't */ ··· 246 225 mips_scroll_message(); 247 226 } 248 227 228 + irqreturn_t mips_perf_interrupt(int irq, void *dev_id) 229 + { 230 + return perf_irq(); 231 + } 232 + 233 + static struct irqaction perf_irqaction = { 234 + .handler = mips_perf_interrupt, 235 + .flags = IRQF_DISABLED | IRQF_PERCPU, 236 + .name = "performance", 237 + }; 238 + 239 + void __init plat_perf_setup(struct irqaction *irq) 240 + { 241 + int hwint = 0; 242 + mipsxx_perfcount_irq = -1; 243 + 244 + #ifdef MSC01E_INT_BASE 245 + if (cpu_has_veic) { 246 + set_vi_handler (MSC01E_INT_PERFCTR, mips_perf_dispatch); 247 + mipsxx_perfcount_irq = MSC01E_INT_BASE + MSC01E_INT_PERFCTR; 248 + } else 249 + #endif 250 + if (cpu_has_mips_r2) { 251 + /* 252 + * Read IntCtl.IPPCI to determine the performance 253 + * counter interrupt 254 + */ 255 + hwint = (read_c0_intctl () >> 26) & 7; 256 + if (hwint != MIPSCPU_INT_CPUCTR) { 257 + if (cpu_has_vint) 258 + set_vi_handler (hwint, mips_perf_dispatch); 259 + mipsxx_perfcount_irq = MIPSCPU_INT_BASE + hwint; 260 + } 261 + } 262 + if (mipsxx_perfcount_irq >= 0) { 263 + #ifdef CONFIG_MIPS_MT_SMTC 264 + setup_irq_smtc(mipsxx_perfcount_irq, irq, 0x100 << hwint); 265 + #else 266 + setup_irq(mipsxx_perfcount_irq, irq); 267 + #endif /* CONFIG_MIPS_MT_SMTC */ 268 + #ifdef CONFIG_SMP 269 + set_irq_handler(mipsxx_perfcount_irq, handle_percpu_irq); 270 + #endif 271 + } 272 + } 273 + 249 274 void __init plat_timer_setup(struct irqaction *irq) 250 275 { 276 + int hwint = 0; 251 277 #ifdef MSC01E_INT_BASE 252 278 if (cpu_has_veic) { 253 279 set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); 254 280 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; 255 - } else 281 + } 282 + else 256 283 #endif 257 284 { 285 + if (cpu_has_mips_r2) 286 + /* 287 + * Read IntCtl.IPTI to determine the timer interrupt 288 + */ 289 + hwint = (read_c0_intctl () >> 29) & 7; 290 + else 291 + hwint = MIPSCPU_INT_CPUCTR; 258 292 if (cpu_has_vint) 259 - set_vi_handler (MIPSCPU_INT_CPUCTR, mips_timer_dispatch); 260 - mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR; 293 + set_vi_handler (hwint, mips_timer_dispatch); 294 + mips_cpu_timer_irq = MIPSCPU_INT_BASE + hwint; 261 295 } 262 - 263 296 264 297 /* we are using the cpu counter for timer interrupts */ 265 298 irq->handler = mips_timer_interrupt; /* we use our own handler */ 266 299 #ifdef CONFIG_MIPS_MT_SMTC 267 - setup_irq_smtc(mips_cpu_timer_irq, irq, CPUCTR_IMASKBIT); 300 + setup_irq_smtc(mips_cpu_timer_irq, irq, 0x100 << hwint); 268 301 #else 269 302 setup_irq(mips_cpu_timer_irq, irq); 270 303 #endif /* CONFIG_MIPS_MT_SMTC */ 271 - 272 304 #ifdef CONFIG_SMP 273 - /* irq_desc(riptor) is a global resource, when the interrupt overlaps 274 - on seperate cpu's the first one tries to handle the second interrupt. 275 - The effect is that the int remains disabled on the second cpu. 276 - Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ 277 - irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; 278 305 set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); 279 306 #endif 307 + 308 + plat_perf_setup(&perf_irqaction); 280 309 }
+15 -27
arch/mips/mips-boards/malta/malta_int.c
··· 53 53 * Determine highest priority pending interrupt by performing 54 54 * a PCI Interrupt Acknowledge cycle. 55 55 */ 56 - switch(mips_revision_corid) { 57 - case MIPS_REVISION_CORID_CORE_MSC: 58 - case MIPS_REVISION_CORID_CORE_FPGA2: 59 - case MIPS_REVISION_CORID_CORE_FPGA3: 60 - case MIPS_REVISION_CORID_CORE_24K: 61 - case MIPS_REVISION_CORID_CORE_EMUL_MSC: 56 + switch (mips_revision_sconid) { 57 + case MIPS_REVISION_SCON_SOCIT: 58 + case MIPS_REVISION_SCON_ROCIT: 59 + case MIPS_REVISION_SCON_SOCITSC: 60 + case MIPS_REVISION_SCON_SOCITSCP: 62 61 MSC_READ(MSC01_PCI_IACK, irq); 63 62 irq &= 0xff; 64 63 break; 65 - case MIPS_REVISION_CORID_QED_RM5261: 66 - case MIPS_REVISION_CORID_CORE_LV: 67 - case MIPS_REVISION_CORID_CORE_FPGA: 68 - case MIPS_REVISION_CORID_CORE_FPGAR2: 64 + case MIPS_REVISION_SCON_GT64120: 69 65 irq = GT_READ(GT_PCI0_IACK_OFS); 70 66 irq &= 0xff; 71 67 break; 72 - case MIPS_REVISION_CORID_BONITO64: 73 - case MIPS_REVISION_CORID_CORE_20K: 74 - case MIPS_REVISION_CORID_CORE_EMUL_BON: 68 + case MIPS_REVISION_SCON_BONITO: 75 69 /* The following will generate a PCI IACK cycle on the 76 70 * Bonito controller. It's a little bit kludgy, but it 77 71 * was the easiest way to implement it in hardware at ··· 83 89 BONITO_PCIMAP_CFG = 0; 84 90 break; 85 91 default: 86 - printk("Unknown Core card, don't know the system controller.\n"); 92 + printk("Unknown system controller.\n"); 87 93 return -1; 88 94 } 89 95 return irq; ··· 138 144 Do it for the others too. 139 145 */ 140 146 141 - switch(mips_revision_corid) { 142 - case MIPS_REVISION_CORID_CORE_MSC: 143 - case MIPS_REVISION_CORID_CORE_FPGA2: 144 - case MIPS_REVISION_CORID_CORE_FPGA3: 145 - case MIPS_REVISION_CORID_CORE_24K: 146 - case MIPS_REVISION_CORID_CORE_EMUL_MSC: 147 + switch (mips_revision_sconid) { 148 + case MIPS_REVISION_SCON_SOCIT: 149 + case MIPS_REVISION_SCON_ROCIT: 150 + case MIPS_REVISION_SCON_SOCITSC: 151 + case MIPS_REVISION_SCON_SOCITSCP: 147 152 ll_msc_irq(); 148 153 break; 149 - case MIPS_REVISION_CORID_QED_RM5261: 150 - case MIPS_REVISION_CORID_CORE_LV: 151 - case MIPS_REVISION_CORID_CORE_FPGA: 152 - case MIPS_REVISION_CORID_CORE_FPGAR2: 154 + case MIPS_REVISION_SCON_GT64120: 153 155 intrcause = GT_READ(GT_INTRCAUSE_OFS); 154 156 datalo = GT_READ(GT_CPUERR_ADDRLO_OFS); 155 157 datahi = GT_READ(GT_CPUERR_ADDRHI_OFS); 156 158 printk("GT_INTRCAUSE = %08x\n", intrcause); 157 159 printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo); 158 160 break; 159 - case MIPS_REVISION_CORID_BONITO64: 160 - case MIPS_REVISION_CORID_CORE_20K: 161 - case MIPS_REVISION_CORID_CORE_EMUL_BON: 161 + case MIPS_REVISION_SCON_BONITO: 162 162 pcibadaddr = BONITO_PCIBADADDR; 163 163 pcimstat = BONITO_PCIMSTAT; 164 164 intisr = BONITO_INTISR;
+1 -3
arch/mips/mips-boards/malta/malta_setup.c
··· 103 103 kgdb_config (); 104 104 #endif 105 105 106 - if ((mips_revision_corid == MIPS_REVISION_CORID_BONITO64) || 107 - (mips_revision_corid == MIPS_REVISION_CORID_CORE_20K) || 108 - (mips_revision_corid == MIPS_REVISION_CORID_CORE_EMUL_BON)) { 106 + if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) { 109 107 char *argptr; 110 108 111 109 argptr = prom_getcmdline();
+5 -2
arch/mips/oprofile/op_model_mipsxx.c
··· 177 177 unsigned int counters = op_model_mipsxx_ops.num_counters; 178 178 unsigned int control; 179 179 unsigned int counter; 180 - int handled = 0; 180 + int handled = IRQ_NONE; 181 + 182 + if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26))) 183 + return handled; 181 184 182 185 switch (counters) { 183 186 #define HANDLE_COUNTER(n) \ ··· 191 188 (counter & M_COUNTER_OVERFLOW)) { \ 192 189 oprofile_add_sample(get_irq_regs(), n); \ 193 190 w_c0_perfcntr ## n(reg.counter[n]); \ 194 - handled = 1; \ 191 + handled = IRQ_HANDLED; \ 195 192 } 196 193 HANDLE_COUNTER(3) 197 194 HANDLE_COUNTER(2)
+19 -3
include/asm-mips/mips-boards/generic.h
··· 73 73 * CoreEMUL with Bonito System Controller is treated like a Core20K 74 74 * CoreEMUL with SOC-it 101 System Controller is treated like a CoreMSC 75 75 */ 76 - #define MIPS_REVISION_CORID_CORE_EMUL_BON 0x63 77 - #define MIPS_REVISION_CORID_CORE_EMUL_MSC 0x65 76 + #define MIPS_REVISION_CORID_CORE_EMUL_BON -1 77 + #define MIPS_REVISION_CORID_CORE_EMUL_MSC -2 78 78 79 79 #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) 80 80 81 - extern unsigned int mips_revision_corid; 81 + extern int mips_revision_corid; 82 + 83 + #define MIPS_REVISION_SCON_OTHER 0 84 + #define MIPS_REVISION_SCON_SOCITSC 1 85 + #define MIPS_REVISION_SCON_SOCITSCP 2 86 + 87 + /* Artificial SCON defines for MIPS_REVISION_SCON_OTHER */ 88 + #define MIPS_REVISION_SCON_UNKNOWN -1 89 + #define MIPS_REVISION_SCON_GT64120 -2 90 + #define MIPS_REVISION_SCON_BONITO -3 91 + #define MIPS_REVISION_SCON_BRTL -4 92 + #define MIPS_REVISION_SCON_SOCIT -5 93 + #define MIPS_REVISION_SCON_ROCIT -6 94 + 95 + #define MIPS_REVISION_SCONID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 24) & 0xff) 96 + 97 + extern int mips_revision_sconid; 82 98 83 99 #ifdef CONFIG_PCI 84 100 extern void mips_pcibios_init(void);
+1
include/asm-mips/mips-boards/msc01_pci.h
··· 208 208 * latter, they should be moved elsewhere. 209 209 */ 210 210 #define MIPS_MSC01_PCI_REG_BASE 0x1bd00000 211 + #define MIPS_SOCITSC_PCI_REG_BASE 0x1ff10000 211 212 212 213 extern unsigned long _pcictrl_msc; 213 214