Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SUNLANCE]: fix compilation on sparc-UP
[SPARC]: Defer clock_probe to fs_initcall()
[SPARC64]: Fix typo in pgprot_noncached().
[SPARC64]: Fix quad-float multiply emulation.

+48 -38
+42 -32
arch/sparc/kernel/time.c
··· 225 225 return (data1 == data2); /* Was the write blocked? */ 226 226 } 227 227 228 + static void __init mostek_set_system_time(void) 229 + { 230 + unsigned int year, mon, day, hour, min, sec; 231 + struct mostek48t02 *mregs; 232 + 233 + mregs = (struct mostek48t02 *)mstk48t02_regs; 234 + if(!mregs) { 235 + prom_printf("Something wrong, clock regs not mapped yet.\n"); 236 + prom_halt(); 237 + } 238 + spin_lock_irq(&mostek_lock); 239 + mregs->creg |= MSTK_CREG_READ; 240 + sec = MSTK_REG_SEC(mregs); 241 + min = MSTK_REG_MIN(mregs); 242 + hour = MSTK_REG_HOUR(mregs); 243 + day = MSTK_REG_DOM(mregs); 244 + mon = MSTK_REG_MONTH(mregs); 245 + year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); 246 + xtime.tv_sec = mktime(year, mon, day, hour, min, sec); 247 + xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); 248 + set_normalized_timespec(&wall_to_monotonic, 249 + -xtime.tv_sec, -xtime.tv_nsec); 250 + mregs->creg &= ~MSTK_CREG_READ; 251 + spin_unlock_irq(&mostek_lock); 252 + } 253 + 228 254 /* Probe for the real time clock chip on Sun4 */ 229 255 static __inline__ void sun4_clock_probe(void) 230 256 { ··· 299 273 #endif 300 274 } 301 275 276 + #ifndef CONFIG_SUN4 302 277 static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) 303 278 { 304 279 struct device_node *dp = op->node; ··· 334 307 if (mostek_read(mstk48t02_regs + MOSTEK_SEC) & MSTK_STOP) 335 308 kick_start_clock(); 336 309 310 + mostek_set_system_time(); 311 + 337 312 return 0; 338 313 } 339 314 ··· 354 325 355 326 356 327 /* Probe for the mostek real time clock chip. */ 357 - static void clock_init(void) 328 + static int __init clock_init(void) 358 329 { 359 - of_register_driver(&clock_driver, &of_bus_type); 330 + return of_register_driver(&clock_driver, &of_bus_type); 360 331 } 332 + 333 + /* Must be after subsys_initcall() so that busses are probed. Must 334 + * be before device_initcall() because things like the RTC driver 335 + * need to see the clock registers. 336 + */ 337 + fs_initcall(clock_init); 338 + #endif /* !CONFIG_SUN4 */ 361 339 362 340 void __init sbus_time_init(void) 363 341 { 364 - unsigned int year, mon, day, hour, min, sec; 365 - struct mostek48t02 *mregs; 366 - 367 - #ifdef CONFIG_SUN4 368 - int temp; 369 - struct intersil *iregs; 370 - #endif 371 342 372 343 BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); 373 344 btfixup(); 374 345 375 346 if (ARCH_SUN4) 376 347 sun4_clock_probe(); 377 - else 378 - clock_init(); 379 348 380 349 sparc_init_timers(timer_interrupt); 381 350 382 351 #ifdef CONFIG_SUN4 383 352 if(idprom->id_machtype == (SM_SUN4 | SM_4_330)) { 384 - #endif 385 - mregs = (struct mostek48t02 *)mstk48t02_regs; 386 - if(!mregs) { 387 - prom_printf("Something wrong, clock regs not mapped yet.\n"); 388 - prom_halt(); 389 - } 390 - spin_lock_irq(&mostek_lock); 391 - mregs->creg |= MSTK_CREG_READ; 392 - sec = MSTK_REG_SEC(mregs); 393 - min = MSTK_REG_MIN(mregs); 394 - hour = MSTK_REG_HOUR(mregs); 395 - day = MSTK_REG_DOM(mregs); 396 - mon = MSTK_REG_MONTH(mregs); 397 - year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); 398 - xtime.tv_sec = mktime(year, mon, day, hour, min, sec); 399 - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); 400 - set_normalized_timespec(&wall_to_monotonic, 401 - -xtime.tv_sec, -xtime.tv_nsec); 402 - mregs->creg &= ~MSTK_CREG_READ; 403 - spin_unlock_irq(&mostek_lock); 404 - #ifdef CONFIG_SUN4 353 + mostek_set_system_time(); 405 354 } else if(idprom->id_machtype == (SM_SUN4 | SM_4_260) ) { 406 355 /* initialise the intersil on sun4 */ 356 + unsigned int year, mon, day, hour, min, sec; 357 + int temp; 358 + struct intersil *iregs; 407 359 408 360 iregs=intersil_clock; 409 361 if(!iregs) {
+4 -4
drivers/net/sunlance.c
··· 1537 1537 { 1538 1538 if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || 1539 1539 (idprom->id_machtype == (SM_SUN4|SM_4_470))) { 1540 - memset(&sun4_sdev, 0, sizeof(sdev)); 1540 + memset(&sun4_sdev, 0, sizeof(struct sbus_dev)); 1541 1541 sun4_sdev.reg_addrs[0].phys_addr = sun4_eth_physaddr; 1542 1542 sun4_sdev.irqs[0] = 6; 1543 1543 return sparc_lance_probe_one(&sun4_sdev, NULL, NULL); ··· 1547 1547 1548 1548 static int __exit sunlance_sun4_remove(void) 1549 1549 { 1550 - struct lance_private *lp = dev_get_drvdata(&sun4_sdev->dev); 1550 + struct lance_private *lp = dev_get_drvdata(&sun4_sdev.ofdev.dev); 1551 1551 struct net_device *net_dev = lp->dev; 1552 1552 1553 1553 unregister_netdevice(net_dev); 1554 1554 1555 - lance_free_hwresources(root_lance_dev); 1555 + lance_free_hwresources(lp); 1556 1556 1557 1557 free_netdev(net_dev); 1558 1558 1559 - dev_set_drvdata(&sun4_sdev->dev, NULL); 1559 + dev_set_drvdata(&sun4_sdev.ofdev.dev, NULL); 1560 1560 1561 1561 return 0; 1562 1562 }
+1 -1
include/asm-sparc64/pgtable.h
··· 339 339 " .section .sun4v_2insn_patch, \"ax\"\n" 340 340 " .word 661b\n" 341 341 " andn %0, %4, %0\n" 342 - " or %0, %3, %0\n" 342 + " or %0, %5, %0\n" 343 343 " .previous\n" 344 344 : "=r" (val) 345 345 : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U),
+1 -1
include/asm-sparc64/sfp-machine.h
··· 34 34 #define _FP_MUL_MEAT_D(R,X,Y) \ 35 35 _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) 36 36 #define _FP_MUL_MEAT_Q(R,X,Y) \ 37 - _FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) 37 + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) 38 38 39 39 #define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) 40 40 #define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)