Some long forgotten changes from the linux-mac68k CVS: Fix swapped DrvrSW and DrvrHW values in printk message. Suppress debug printk messages. Avoid console_loglevel misuse. The original commits are these: http://linux-mac68k.cvs.sourceforge.net/viewvc/linux-mac68k/linux-mac68k/drivers/nubus/nubus.c?r1=1.22.2.1&r2=1.22.2.2&pathrev=linux-2_2 http://linux-mac68k.cvs.sourceforge.net/viewvc/linux-mac68k/linux-mac68k/drivers/nubus/nubus.c?r1=1.21&r2=1.22&pathrev=linux-2_2 The CVS commits fell short of removing all of the misuse of console_loglevel in nubus_add_board() so I finished the job. I've also added some missing message severity levels and converted a printk loop to the MAC address "%pM" format specifier.
Unified · Split
| @@ -103,7 +103,7 @@ static void nubus_rewind(unsigned char **ptr, int len, int map) · 102 unmodified lines | |||
| 103 | 103 | ||
| 104 | /* Sanity check */ | 104 | /* Sanity check */ |
| 105 | if(len > 65536) | 105 | if(len > 65536) |
| 106 | printk(KERN_ERR "rewind of 0x%08x!\n", len); | 106 | pr_err("rewind of 0x%08x!\n", len); |
| 107 | while(len) | 107 | while(len) |
| 108 | { | 108 | { |
| 109 | do | 109 | do |
| @@ -120,7 +120,7 @@ static void nubus_advance(unsigned char **ptr, int len, int map) · 10 unmodified lines | |||
| 120 | { | 120 | { |
| 121 | unsigned char *p = *ptr; | 121 | unsigned char *p = *ptr; |
| 122 | if(len>65536) | 122 | if(len>65536) |
| 123 | printk(KERN_ERR "advance of 0x%08x!\n", len); | 123 | pr_err("advance of 0x%08x!\n", len); |
| 124 | while(len) | 124 | while(len) |
| 125 | { | 125 | { |
| 126 | while(not_useful(p,map)) | 126 | while(not_useful(p,map)) |
| @@ -375,14 +375,14 @@ static int __init nubus_show_display_resource(struct nubus_dev* dev, · 248 unmodified lines | |||
| 375 | { | 375 | { |
| 376 | switch (ent->type) { | 376 | switch (ent->type) { |
| 377 | case NUBUS_RESID_GAMMADIR: | 377 | case NUBUS_RESID_GAMMADIR: |
| 378 | printk(KERN_INFO " gamma directory offset: 0x%06x\n", ent->data); | 378 | pr_info(" gamma directory offset: 0x%06x\n", ent->data); |
| 379 | break; | 379 | break; |
| 380 | case 0x0080 ... 0x0085: | 380 | case 0x0080 ... 0x0085: |
| 381 | printk(KERN_INFO " mode %02X info offset: 0x%06x\n", | 381 | pr_info(" mode %02X info offset: 0x%06x\n", |
| 382 | ent->type, ent->data); | 382 | ent->type, ent->data); |
| 383 | break; | 383 | break; |
| 384 | default: | 384 | default: |
| 385 | printk(KERN_INFO " unknown resource %02X, data 0x%06x\n", | 385 | pr_info(" unknown resource %02X, data 0x%06x\n", |
| 386 | ent->type, ent->data); | 386 | ent->type, ent->data); |
| 387 | } | 387 | } |
| 388 | return 0; | 388 | return 0; |
| @@ -395,18 +395,13 @@ static int __init nubus_show_network_resource(struct nubus_dev* dev, · 6 unmodified lines | |||
| 395 | case NUBUS_RESID_MAC_ADDRESS: | 395 | case NUBUS_RESID_MAC_ADDRESS: |
| 396 | { | 396 | { |
| 397 | char addr[6]; | 397 | char addr[6]; |
| 398 | int i; | ||
| 399 | 398 | ||
| 400 | nubus_get_rsrc_mem(addr, ent, 6); | 399 | nubus_get_rsrc_mem(addr, ent, 6); |
| 401 | printk(KERN_INFO " MAC address: "); | 400 | pr_info(" MAC address: %pM\n", addr); |
| 402 | for (i = 0; i < 6; i++) | ||
| 403 | printk("%02x%s", addr[i] & 0xff, | ||
| 404 | i == 5 ? "" : ":"); | ||
| 405 | printk("\n"); | ||
| 406 | break; | 401 | break; |
| 407 | } | 402 | } |
| 408 | default: | 403 | default: |
| 409 | printk(KERN_INFO " unknown resource %02X, data 0x%06x\n", | 404 | pr_info(" unknown resource %02X, data 0x%06x\n", |
| 410 | ent->type, ent->data); | 405 | ent->type, ent->data); |
| 411 | } | 406 | } |
| 412 | return 0; | 407 | return 0; |
| @@ -420,7 +415,7 @@ static int __init nubus_show_cpu_resource(struct nubus_dev* dev, · 7 unmodified lines | |||
| 420 | { | 415 | { |
| 421 | unsigned long meminfo[2]; | 416 | unsigned long meminfo[2]; |
| 422 | nubus_get_rsrc_mem(&meminfo, ent, 8); | 417 | nubus_get_rsrc_mem(&meminfo, ent, 8); |
| 423 | printk(KERN_INFO " memory: [ 0x%08lx 0x%08lx ]\n", | 418 | pr_info(" memory: [ 0x%08lx 0x%08lx ]\n", |
| 424 | meminfo[0], meminfo[1]); | 419 | meminfo[0], meminfo[1]); |
| 425 | break; | 420 | break; |
| 426 | } | 421 | } |
| @@ -428,12 +423,12 @@ static int __init nubus_show_cpu_resource(struct nubus_dev* dev, · 1 unmodified line | |||
| 428 | { | 423 | { |
| 429 | unsigned long rominfo[2]; | 424 | unsigned long rominfo[2]; |
| 430 | nubus_get_rsrc_mem(&rominfo, ent, 8); | 425 | nubus_get_rsrc_mem(&rominfo, ent, 8); |
| 431 | printk(KERN_INFO " ROM: [ 0x%08lx 0x%08lx ]\n", | 426 | pr_info(" ROM: [ 0x%08lx 0x%08lx ]\n", |
| 432 | rominfo[0], rominfo[1]); | 427 | rominfo[0], rominfo[1]); |
| 433 | break; | 428 | break; |
| 434 | } | 429 | } |
| 435 | default: | 430 | default: |
| 436 | printk(KERN_INFO " unknown resource %02X, data 0x%06x\n", | 431 | pr_info(" unknown resource %02X, data 0x%06x\n", |
| 437 | ent->type, ent->data); | 432 | ent->type, ent->data); |
| 438 | } | 433 | } |
| 439 | return 0; | 434 | return 0; |
| @@ -453,7 +448,7 @@ static int __init nubus_show_private_resource(struct nubus_dev* dev, · 13 unmodified lines | |||
| 453 | nubus_show_cpu_resource(dev, ent); | 448 | nubus_show_cpu_resource(dev, ent); |
| 454 | break; | 449 | break; |
| 455 | default: | 450 | default: |
| 456 | printk(KERN_INFO " unknown resource %02X, data 0x%06x\n", | 451 | pr_info(" unknown resource %02X, data 0x%06x\n", |
| 457 | ent->type, ent->data); | 452 | ent->type, ent->data); |
| 458 | } | 453 | } |
| 459 | return 0; | 454 | return 0; |
| @@ -468,16 +463,15 @@ static struct nubus_dev* __init · 8 unmodified lines | |||
| 468 | struct nubus_dirent ent; | 463 | struct nubus_dirent ent; |
| 469 | struct nubus_dev* dev; | 464 | struct nubus_dev* dev; |
| 470 | 465 | ||
| 471 | printk(KERN_INFO " Function 0x%02x:\n", parent->type); | 466 | pr_info(" Function 0x%02x:\n", parent->type); |
| 472 | nubus_get_subdir(parent, &dir); | 467 | nubus_get_subdir(parent, &dir); |
| 473 | 468 | ||
| 474 | /* Apple seems to have botched the ROM on the IIx */ | 469 | /* Apple seems to have botched the ROM on the IIx */ |
| 475 | if (slot == 0 && (unsigned long)dir.base % 2) | 470 | if (slot == 0 && (unsigned long)dir.base % 2) |
| 476 | dir.base += 1; | 471 | dir.base += 1; |
| 477 | 472 | ||
| 478 | if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) | 473 | pr_debug("%s: parent is 0x%p, dir is 0x%p\n", |
| 479 | printk(KERN_DEBUG "nubus_get_functional_resource: parent is 0x%p, dir is 0x%p\n", | 474 | __func__, parent->base, dir.base); |
| 480 | parent->base, dir.base); | ||
| 481 | 475 | ||
| 482 | /* Actually we should probably panic if this fails */ | 476 | /* Actually we should probably panic if this fails */ |
| 483 | if ((dev = kzalloc(sizeof(*dev), GFP_ATOMIC)) == NULL) | 477 | if ((dev = kzalloc(sizeof(*dev), GFP_ATOMIC)) == NULL) |
| @@ -498,14 +492,14 @@ static struct nubus_dev* __init · 14 unmodified lines | |||
| 498 | dev->type = nbtdata[1]; | 492 | dev->type = nbtdata[1]; |
| 499 | dev->dr_sw = nbtdata[2]; | 493 | dev->dr_sw = nbtdata[2]; |
| 500 | dev->dr_hw = nbtdata[3]; | 494 | dev->dr_hw = nbtdata[3]; |
| 501 | printk(KERN_INFO " type: [cat 0x%x type 0x%x hw 0x%x sw 0x%x]\n", | 495 | pr_info(" type: [cat 0x%x type 0x%x sw 0x%x hw 0x%x]\n", |
| 502 | nbtdata[0], nbtdata[1], nbtdata[2], nbtdata[3]); | 496 | nbtdata[0], nbtdata[1], nbtdata[2], nbtdata[3]); |
| 503 | break; | 497 | break; |
| 504 | } | 498 | } |
| 505 | case NUBUS_RESID_NAME: | 499 | case NUBUS_RESID_NAME: |
| 506 | { | 500 | { |
| 507 | nubus_get_rsrc_str(dev->name, &ent, 64); | 501 | nubus_get_rsrc_str(dev->name, &ent, 64); |
| 508 | printk(KERN_INFO " name: %s\n", dev->name); | 502 | pr_info(" name: %s\n", dev->name); |
| 509 | break; | 503 | break; |
| 510 | } | 504 | } |
| 511 | case NUBUS_RESID_DRVRDIR: | 505 | case NUBUS_RESID_DRVRDIR: |
| @@ -517,8 +511,7 @@ static struct nubus_dev* __init · 5 unmodified lines | |||
| 517 | nubus_get_subdir(&ent, &drvr_dir); | 511 | nubus_get_subdir(&ent, &drvr_dir); |
| 518 | nubus_readdir(&drvr_dir, &drvr_ent); | 512 | nubus_readdir(&drvr_dir, &drvr_ent); |
| 519 | dev->driver = nubus_dirptr(&drvr_ent); | 513 | dev->driver = nubus_dirptr(&drvr_ent); |
| 520 | printk(KERN_INFO " driver at: 0x%p\n", | 514 | pr_info(" driver at: 0x%p\n", dev->driver); |
| 521 | dev->driver); | ||
| 522 | break; | 515 | break; |
| 523 | } | 516 | } |
| 524 | case NUBUS_RESID_MINOR_BASEOS: | 517 | case NUBUS_RESID_MINOR_BASEOS: |
| @@ -526,22 +519,20 @@ static struct nubus_dev* __init · 1 unmodified line | |||
| 526 | multiple framebuffers. It might be handy | 519 | multiple framebuffers. It might be handy |
| 527 | for Ethernet as well */ | 520 | for Ethernet as well */ |
| 528 | nubus_get_rsrc_mem(&dev->iobase, &ent, 4); | 521 | nubus_get_rsrc_mem(&dev->iobase, &ent, 4); |
| 529 | printk(KERN_INFO " memory offset: 0x%08lx\n", | 522 | pr_info(" memory offset: 0x%08lx\n", dev->iobase); |
| 530 | dev->iobase); | ||
| 531 | break; | 523 | break; |
| 532 | case NUBUS_RESID_MINOR_LENGTH: | 524 | case NUBUS_RESID_MINOR_LENGTH: |
| 533 | /* Ditto */ | 525 | /* Ditto */ |
| 534 | nubus_get_rsrc_mem(&dev->iosize, &ent, 4); | 526 | nubus_get_rsrc_mem(&dev->iosize, &ent, 4); |
| 535 | printk(KERN_INFO " memory length: 0x%08lx\n", | 527 | pr_info(" memory length: 0x%08lx\n", dev->iosize); |
| 536 | dev->iosize); | ||
| 537 | break; | 528 | break; |
| 538 | case NUBUS_RESID_FLAGS: | 529 | case NUBUS_RESID_FLAGS: |
| 539 | dev->flags = ent.data; | 530 | dev->flags = ent.data; |
| 540 | printk(KERN_INFO " flags: 0x%06x\n", dev->flags); | 531 | pr_info(" flags: 0x%06x\n", dev->flags); |
| 541 | break; | 532 | break; |
| 542 | case NUBUS_RESID_HWDEVID: | 533 | case NUBUS_RESID_HWDEVID: |
| 543 | dev->hwdevid = ent.data; | 534 | dev->hwdevid = ent.data; |
| 544 | printk(KERN_INFO " hwdevid: 0x%06x\n", dev->hwdevid); | 535 | pr_info(" hwdevid: 0x%06x\n", dev->hwdevid); |
| 545 | break; | 536 | break; |
| 546 | default: | 537 | default: |
| 547 | /* Local/Private resources have their own | 538 | /* Local/Private resources have their own |
| @@ -568,11 +559,10 @@ static int __init nubus_get_vidnames(struct nubus_board* board, · 20 unmodified lines | |||
| 568 | char name[32]; | 559 | char name[32]; |
| 569 | }; | 560 | }; |
| 570 | 561 | ||
| 571 | printk(KERN_INFO " video modes supported:\n"); | 562 | pr_info(" video modes supported:\n"); |
| 572 | nubus_get_subdir(parent, &dir); | 563 | nubus_get_subdir(parent, &dir); |
| 573 | if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) | 564 | pr_debug("%s: parent is 0x%p, dir is 0x%p\n", |
| 574 | printk(KERN_DEBUG "nubus_get_vidnames: parent is 0x%p, dir is 0x%p\n", | 565 | __func__, parent->base, dir.base); |
| 575 | parent->base, dir.base); | ||
| 576 | 566 | ||
| 577 | while(nubus_readdir(&dir, &ent) != -1) | 567 | while(nubus_readdir(&dir, &ent) != -1) |
| 578 | { | 568 | { |
| @@ -587,7 +577,7 @@ static int __init nubus_get_vidnames(struct nubus_board* board, · 8 unmodified lines | |||
| 587 | size = sizeof(mode) - 1; | 577 | size = sizeof(mode) - 1; |
| 588 | memset(&mode, 0, sizeof(mode)); | 578 | memset(&mode, 0, sizeof(mode)); |
| 589 | nubus_get_rsrc_mem(&mode, &ent, size); | 579 | nubus_get_rsrc_mem(&mode, &ent, size); |
| 590 | printk (KERN_INFO " %02X: (%02X) %s\n", ent.type, | 580 | pr_info(" %02X: (%02X) %s\n", ent.type, |
| 591 | mode.id, mode.name); | 581 | mode.id, mode.name); |
| 592 | } | 582 | } |
| 593 | return 0; | 583 | return 0; |
| @@ -602,21 +592,21 @@ static int __init nubus_get_icon(struct nubus_board* board, · 8 unmodified lines | |||
| 602 | int x, y; | 592 | int x, y; |
| 603 | 593 | ||
| 604 | nubus_get_rsrc_mem(&icon, ent, 128); | 594 | nubus_get_rsrc_mem(&icon, ent, 128); |
| 605 | printk(KERN_INFO " icon:\n"); | 595 | pr_info(" icon:\n"); |
| 606 | 596 | ||
| 607 | /* We should actually plot these somewhere in the framebuffer | 597 | /* We should actually plot these somewhere in the framebuffer |
| 608 | init. This is just to demonstrate that they do, in fact, | 598 | init. This is just to demonstrate that they do, in fact, |
| 609 | exist */ | 599 | exist */ |
| 610 | for (y = 0; y < 32; y++) { | 600 | for (y = 0; y < 32; y++) { |
| 611 | printk(KERN_INFO " "); | 601 | pr_info(" "); |
| 612 | for (x = 0; x < 32; x++) { | 602 | for (x = 0; x < 32; x++) { |
| 613 | if (icon[y*4 + x/8] | 603 | if (icon[y*4 + x/8] |
| 614 | & (0x80 >> (x%8))) | 604 | & (0x80 >> (x%8))) |
| 615 | printk("*"); | 605 | pr_cont("*"); |
| 616 | else | 606 | else |
| 617 | printk(" "); | 607 | pr_cont(" "); |
| 618 | } | 608 | } |
| 619 | printk("\n"); | 609 | pr_cont("\n"); |
| 620 | } | 610 | } |
| 621 | return 0; | 611 | return 0; |
| 622 | } | 612 | } |
| @@ -629,11 +619,10 @@ static int __init nubus_get_vendorinfo(struct nubus_board* board, · 6 unmodified lines | |||
| 629 | static char* vendor_fields[6] = {"ID", "serial", "revision", | 619 | static char* vendor_fields[6] = {"ID", "serial", "revision", |
| 630 | "part", "date", "unknown field"}; | 620 | "part", "date", "unknown field"}; |
| 631 | 621 | ||
| 632 | printk(KERN_INFO " vendor info:\n"); | 622 | pr_info(" vendor info:\n"); |
| 633 | nubus_get_subdir(parent, &dir); | 623 | nubus_get_subdir(parent, &dir); |
| 634 | if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) | 624 | pr_debug("%s: parent is 0x%p, dir is 0x%p\n", |
| 635 | printk(KERN_DEBUG "nubus_get_vendorinfo: parent is 0x%p, dir is 0x%p\n", | 625 | __func__, parent->base, dir.base); |
| 636 | parent->base, dir.base); | ||
| 637 | 626 | ||
| 638 | while(nubus_readdir(&dir, &ent) != -1) | 627 | while(nubus_readdir(&dir, &ent) != -1) |
| 639 | { | 628 | { |
| @@ -643,8 +632,7 @@ static int __init nubus_get_vendorinfo(struct nubus_board* board, · 3 unmodified lines | |||
| 643 | nubus_get_rsrc_str(name, &ent, 64); | 632 | nubus_get_rsrc_str(name, &ent, 64); |
| 644 | if (ent.type > 5) | 633 | if (ent.type > 5) |
| 645 | ent.type = 5; | 634 | ent.type = 5; |
| 646 | printk(KERN_INFO " %s: %s\n", | 635 | pr_info(" %s: %s\n", vendor_fields[ent.type - 1], name); |
| 647 | vendor_fields[ent.type-1], name); | ||
| 648 | } | 636 | } |
| 649 | return 0; | 637 | return 0; |
| 650 | } | 638 | } |
| @@ -656,9 +644,8 @@ static int __init nubus_get_board_resource(struct nubus_board* board, int slot, · 5 unmodified lines | |||
| 656 | struct nubus_dirent ent; | 644 | struct nubus_dirent ent; |
| 657 | 645 | ||
| 658 | nubus_get_subdir(parent, &dir); | 646 | nubus_get_subdir(parent, &dir); |
| 659 | if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) | 647 | pr_debug("%s: parent is 0x%p, dir is 0x%p\n", |
| 660 | printk(KERN_DEBUG "nubus_get_board_resource: parent is 0x%p, dir is 0x%p\n", | 648 | __func__, parent->base, dir.base); |
| 661 | parent->base, dir.base); | ||
| 662 | 649 | ||
| 663 | while(nubus_readdir(&dir, &ent) != -1) | 650 | while(nubus_readdir(&dir, &ent) != -1) |
| 664 | { | 651 | { |
| @@ -670,38 +657,37 @@ static int __init nubus_get_board_resource(struct nubus_board* board, int slot, · 5 unmodified lines | |||
| 670 | useful except insofar as it tells us that | 657 | useful except insofar as it tells us that |
| 671 | we really are looking at a board resource. */ | 658 | we really are looking at a board resource. */ |
| 672 | nubus_get_rsrc_mem(nbtdata, &ent, 8); | 659 | nubus_get_rsrc_mem(nbtdata, &ent, 8); |
| 673 | printk(KERN_INFO " type: [cat 0x%x type 0x%x hw 0x%x sw 0x%x]\n", | 660 | pr_info(" type: [cat 0x%x type 0x%x sw 0x%x hw 0x%x]\n", |
| 674 | nbtdata[0], nbtdata[1], nbtdata[2], | 661 | nbtdata[0], nbtdata[1], nbtdata[2], nbtdata[3]); |
| 675 | nbtdata[3]); | ||
| 676 | if (nbtdata[0] != 1 || nbtdata[1] != 0 || | 662 | if (nbtdata[0] != 1 || nbtdata[1] != 0 || |
| 677 | nbtdata[2] != 0 || nbtdata[3] != 0) | 663 | nbtdata[2] != 0 || nbtdata[3] != 0) |
| 678 | printk(KERN_ERR "this sResource is not a board resource!\n"); | 664 | pr_err("this sResource is not a board resource!\n"); |
| 679 | break; | 665 | break; |
| 680 | } | 666 | } |
| 681 | case NUBUS_RESID_NAME: | 667 | case NUBUS_RESID_NAME: |
| 682 | nubus_get_rsrc_str(board->name, &ent, 64); | 668 | nubus_get_rsrc_str(board->name, &ent, 64); |
| 683 | printk(KERN_INFO " name: %s\n", board->name); | 669 | pr_info(" name: %s\n", board->name); |
| 684 | break; | 670 | break; |
| 685 | case NUBUS_RESID_ICON: | 671 | case NUBUS_RESID_ICON: |
| 686 | nubus_get_icon(board, &ent); | 672 | nubus_get_icon(board, &ent); |
| 687 | break; | 673 | break; |
| 688 | case NUBUS_RESID_BOARDID: | 674 | case NUBUS_RESID_BOARDID: |
| 689 | printk(KERN_INFO " board id: 0x%x\n", ent.data); | 675 | pr_info(" board id: 0x%x\n", ent.data); |
| 690 | break; | 676 | break; |
| 691 | case NUBUS_RESID_PRIMARYINIT: | 677 | case NUBUS_RESID_PRIMARYINIT: |
| 692 | printk(KERN_INFO " primary init offset: 0x%06x\n", ent.data); | 678 | pr_info(" primary init offset: 0x%06x\n", ent.data); |
| 693 | break; | 679 | break; |
| 694 | case NUBUS_RESID_VENDORINFO: | 680 | case NUBUS_RESID_VENDORINFO: |
| 695 | nubus_get_vendorinfo(board, &ent); | 681 | nubus_get_vendorinfo(board, &ent); |
| 696 | break; | 682 | break; |
| 697 | case NUBUS_RESID_FLAGS: | 683 | case NUBUS_RESID_FLAGS: |
| 698 | printk(KERN_INFO " flags: 0x%06x\n", ent.data); | 684 | pr_info(" flags: 0x%06x\n", ent.data); |
| 699 | break; | 685 | break; |
| 700 | case NUBUS_RESID_HWDEVID: | 686 | case NUBUS_RESID_HWDEVID: |
| 701 | printk(KERN_INFO " hwdevid: 0x%06x\n", ent.data); | 687 | pr_info(" hwdevid: 0x%06x\n", ent.data); |
| 702 | break; | 688 | break; |
| 703 | case NUBUS_RESID_SECONDINIT: | 689 | case NUBUS_RESID_SECONDINIT: |
| 704 | printk(KERN_INFO " secondary init offset: 0x%06x\n", ent.data); | 690 | pr_info(" secondary init offset: 0x%06x\n", ent.data); |
| 705 | break; | 691 | break; |
| 706 | /* WTF isn't this in the functional resources? */ | 692 | /* WTF isn't this in the functional resources? */ |
| 707 | case NUBUS_RESID_VIDNAMES: | 693 | case NUBUS_RESID_VIDNAMES: |
| @@ -709,11 +695,11 @@ static int __init nubus_get_board_resource(struct nubus_board* board, int slot, · 1 unmodified line | |||
| 709 | break; | 695 | break; |
| 710 | /* Same goes for this */ | 696 | /* Same goes for this */ |
| 711 | case NUBUS_RESID_VIDMODES: | 697 | case NUBUS_RESID_VIDMODES: |
| 712 | printk(KERN_INFO " video mode parameter directory offset: 0x%06x\n", | 698 | pr_info(" video mode parameter directory offset: 0x%06x\n", |
| 713 | ent.data); | 699 | ent.data); |
| 714 | break; | 700 | break; |
| 715 | default: | 701 | default: |
| 716 | printk(KERN_INFO " unknown resource %02X, data 0x%06x\n", | 702 | pr_info(" unknown resource %02X, data 0x%06x\n", |
| 717 | ent.type, ent.data); | 703 | ent.type, ent.data); |
| 718 | } | 704 | } |
| 719 | } | 705 | } |
| @@ -818,21 +804,17 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes) · 98 unmodified lines | |||
| 818 | board->fblock = rp; | 804 | board->fblock = rp; |
| 819 | 805 | ||
| 820 | /* Dump the format block for debugging purposes */ | 806 | /* Dump the format block for debugging purposes */ |
| 821 | if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) { | 807 | pr_debug("Slot %X, format block at 0x%p:\n", slot, rp); |
| 822 | int i; | 808 | pr_debug("%02lx\n", nubus_get_rom(&rp, 1, bytelanes)); |
| 823 | printk(KERN_DEBUG "Slot %X, format block at 0x%p\n", | 809 | pr_debug("%02lx\n", nubus_get_rom(&rp, 1, bytelanes)); |
| 824 | slot, rp); | 810 | pr_debug("%08lx\n", nubus_get_rom(&rp, 4, bytelanes)); |
| 825 | printk(KERN_DEBUG "Format block: "); | 811 | pr_debug("%02lx\n", nubus_get_rom(&rp, 1, bytelanes)); |
| 826 | for (i = 0; i < FORMAT_BLOCK_SIZE; i += 4) { | 812 | pr_debug("%02lx\n", nubus_get_rom(&rp, 1, bytelanes)); |
| 827 | unsigned short foo, bar; | 813 | pr_debug("%08lx\n", nubus_get_rom(&rp, 4, bytelanes)); |
| 828 | foo = nubus_get_rom(&rp, 2, bytelanes); | 814 | pr_debug("%08lx\n", nubus_get_rom(&rp, 4, bytelanes)); |
| 829 | bar = nubus_get_rom(&rp, 2, bytelanes); | 815 | pr_debug("%08lx\n", nubus_get_rom(&rp, 4, bytelanes)); |
| 830 | printk("%04x %04x ", foo, bar); | 816 | rp = board->fblock; |
| 831 | } | 817 | |
| 832 | printk("\n"); | ||
| 833 | rp = board->fblock; | ||
| 834 | } | ||
| 835 | |||
| 836 | board->slot = slot; | 818 | board->slot = slot; |
| 837 | board->slot_addr = (unsigned long) nubus_slot_addr(slot); | 819 | board->slot_addr = (unsigned long) nubus_slot_addr(slot); |
| 838 | board->doffset = nubus_get_rom(&rp, 4, bytelanes); | 820 | board->doffset = nubus_get_rom(&rp, 4, bytelanes); |
| @@ -850,10 +832,10 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes) · 11 unmodified lines | |||
| 850 | 832 | ||
| 851 | /* Directory offset should be small and negative... */ | 833 | /* Directory offset should be small and negative... */ |
| 852 | if(!(board->doffset & 0x00FF0000)) | 834 | if(!(board->doffset & 0x00FF0000)) |
| 853 | printk(KERN_WARNING "Dodgy doffset!\n"); | 835 | pr_warn("Dodgy doffset!\n"); |
| 854 | dpat = nubus_get_rom(&rp, 4, bytelanes); | 836 | dpat = nubus_get_rom(&rp, 4, bytelanes); |
| 855 | if(dpat != NUBUS_TEST_PATTERN) | 837 | if(dpat != NUBUS_TEST_PATTERN) |
| 856 | printk(KERN_WARNING "Wrong test pattern %08lx!\n", dpat); | 838 | pr_warn("Wrong test pattern %08lx!\n", dpat); |
| 857 | 839 | ||
| 858 | /* | 840 | /* |
| 859 | * I wonder how the CRC is meant to work - | 841 | * I wonder how the CRC is meant to work - |
| @@ -867,7 +849,7 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes) · 7 unmodified lines | |||
| 867 | nubus_get_root_dir(board, &dir); | 849 | nubus_get_root_dir(board, &dir); |
| 868 | 850 | ||
| 869 | /* We're ready to rock */ | 851 | /* We're ready to rock */ |
| 870 | printk(KERN_INFO "Slot %X:\n", slot); | 852 | pr_info("Slot %X:\n", slot); |
| 871 | 853 | ||
| 872 | /* Each slot should have one board resource and any number of | 854 | /* Each slot should have one board resource and any number of |
| 873 | functional resources. So we'll fill in some fields in the | 855 | functional resources. So we'll fill in some fields in the |
| @@ -876,10 +858,10 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes) · 2 unmodified lines | |||
| 876 | for each of them. */ | 858 | for each of them. */ |
| 877 | if (nubus_readdir(&dir, &ent) == -1) { | 859 | if (nubus_readdir(&dir, &ent) == -1) { |
| 878 | /* We can't have this! */ | 860 | /* We can't have this! */ |
| 879 | printk(KERN_ERR "Board resource not found!\n"); | 861 | pr_err("Board resource not found!\n"); |
| 880 | return NULL; | 862 | return NULL; |
| 881 | } else { | 863 | } else { |
| 882 | printk(KERN_INFO " Board resource:\n"); | 864 | pr_info(" Board resource:\n"); |
| 883 | nubus_get_board_resource(board, slot, &ent); | 865 | nubus_get_board_resource(board, slot, &ent); |
| 884 | } | 866 | } |
| 885 | 867 | ||
| @@ -929,7 +911,6 @@ void __init nubus_probe_slot(int slot) · 43 unmodified lines | |||
| 929 | if (!card_present) | 911 | if (!card_present) |
| 930 | continue; | 912 | continue; |
| 931 | 913 | ||
| 932 | printk(KERN_DEBUG "Now probing slot %X at %p\n", slot, rp); | ||
| 933 | dp = *rp; | 914 | dp = *rp; |
| 934 | if(dp == 0) | 915 | if(dp == 0) |
| 935 | continue; | 916 | continue; |
| @@ -984,7 +965,7 @@ static int __init nubus_init(void) · 48 unmodified lines | |||
| 984 | #endif | 965 | #endif |
| 985 | 966 | ||
| 986 | /* And probe */ | 967 | /* And probe */ |
| 987 | printk("NuBus: Scanning NuBus slots.\n"); | 968 | pr_info("NuBus: Scanning NuBus slots.\n"); |
| 988 | nubus_devices = NULL; | 969 | nubus_devices = NULL; |
| 989 | nubus_boards = NULL; | 970 | nubus_boards = NULL; |
| 990 | nubus_scan_bus(); | 971 | nubus_scan_bus(); |