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

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: irq_node.handler() should return irqreturn_t
m68k: section mismatch fixes: Atari SCSI
m68k: section mismatch fixes: DMAsound for Atari
MAINTAINERS: Replace dead link to m68k CVS repository by link to new git repository
m68k: mac - Add SWIM floppy support
m68k: mac - Add a new entry in mac_model to identify the floppy controller type.
m68k: Add install target

+1483 -60
+1 -1
MAINTAINERS
··· 2845 2845 M: zippel@linux-m68k.org 2846 2846 L: linux-m68k@lists.linux-m68k.org 2847 2847 W: http://www.linux-m68k.org/ 2848 - W: http://linux-m68k-cvs.ubb.ca/ 2848 + T: git git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git 2849 2849 S: Maintained 2850 2850 2851 2851 M68K ON APPLE MACINTOSH
+3
arch/m68k/Makefile
··· 117 117 118 118 archclean: 119 119 rm -f vmlinux.gz vmlinux.bz2 120 + 121 + install: 122 + sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
+2 -1
arch/m68k/include/asm/irq_mm.h
··· 3 3 4 4 #include <linux/linkage.h> 5 5 #include <linux/hardirq.h> 6 + #include <linux/irqreturn.h> 6 7 #include <linux/spinlock_types.h> 7 8 8 9 /* ··· 81 80 * interrupt source (if it supports chaining). 82 81 */ 83 82 typedef struct irq_node { 84 - int (*handler)(int, void *); 83 + irqreturn_t (*handler)(int, void *); 85 84 void *dev_id; 86 85 struct irq_node *next; 87 86 unsigned long flags;
+7
arch/m68k/include/asm/macintosh.h
··· 34 34 char scc_type; 35 35 char ether_type; 36 36 char nubus_type; 37 + char floppy_type; 37 38 }; 38 39 39 40 #define MAC_ADB_NONE 0 ··· 71 70 72 71 #define MAC_NO_NUBUS 0 73 72 #define MAC_NUBUS 1 73 + 74 + #define MAC_FLOPPY_IWM 0 75 + #define MAC_FLOPPY_SWIM_ADDR1 1 76 + #define MAC_FLOPPY_SWIM_ADDR2 2 77 + #define MAC_FLOPPY_SWIM_IOP 3 78 + #define MAC_FLOPPY_AV 4 74 79 75 80 /* 76 81 * Gestalt numbers
+52
arch/m68k/install.sh
··· 1 + #!/bin/sh 2 + # 3 + # This file is subject to the terms and conditions of the GNU General Public 4 + # License. See the file "COPYING" in the main directory of this archive 5 + # for more details. 6 + # 7 + # Copyright (C) 1995 by Linus Torvalds 8 + # 9 + # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin 10 + # 11 + # "make install" script for m68k architecture 12 + # 13 + # Arguments: 14 + # $1 - kernel version 15 + # $2 - kernel image file 16 + # $3 - kernel map file 17 + # $4 - default install path (blank if root directory) 18 + # 19 + 20 + verify () { 21 + if [ ! -f "$1" ]; then 22 + echo "" 1>&2 23 + echo " *** Missing file: $1" 1>&2 24 + echo ' *** You need to run "make" before "make install".' 1>&2 25 + echo "" 1>&2 26 + exit 1 27 + fi 28 + } 29 + 30 + # Make sure the files actually exist 31 + verify "$2" 32 + verify "$3" 33 + 34 + # User may have a custom install script 35 + 36 + if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 37 + if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 38 + 39 + # Default install - same as make zlilo 40 + 41 + if [ -f $4/vmlinuz ]; then 42 + mv $4/vmlinuz $4/vmlinuz.old 43 + fi 44 + 45 + if [ -f $4/System.map ]; then 46 + mv $4/System.map $4/System.old 47 + fi 48 + 49 + cat $2 > $4/vmlinuz 50 + cp $3 $4/System.map 51 + 52 + sync
+153 -54
arch/m68k/mac/config.c
··· 22 22 /* keyb */ 23 23 #include <linux/init.h> 24 24 #include <linux/vt_kern.h> 25 + #include <linux/platform_device.h> 25 26 26 27 #define BOOTINFO_COMPAT_1_0 27 28 #include <asm/setup.h> ··· 43 42 #include <asm/mac_via.h> 44 43 #include <asm/mac_oss.h> 45 44 #include <asm/mac_psc.h> 45 + 46 + /* platform device info */ 47 + 48 + #define SWIM_IO_SIZE 0x2000 /* SWIM IO resource size */ 46 49 47 50 /* Mac bootinfo struct */ 48 51 ··· 229 224 .via_type = MAC_VIA_II, 230 225 .scsi_type = MAC_SCSI_OLD, 231 226 .scc_type = MAC_SCC_II, 232 - .nubus_type = MAC_NUBUS 227 + .nubus_type = MAC_NUBUS, 228 + .floppy_type = MAC_FLOPPY_IWM 233 229 }, 234 230 235 231 /* ··· 245 239 .via_type = MAC_VIA_II, 246 240 .scsi_type = MAC_SCSI_OLD, 247 241 .scc_type = MAC_SCC_II, 248 - .nubus_type = MAC_NUBUS 242 + .nubus_type = MAC_NUBUS, 243 + .floppy_type = MAC_FLOPPY_IWM 249 244 }, { 250 245 .ident = MAC_MODEL_IIX, 251 246 .name = "IIx", ··· 254 247 .via_type = MAC_VIA_II, 255 248 .scsi_type = MAC_SCSI_OLD, 256 249 .scc_type = MAC_SCC_II, 257 - .nubus_type = MAC_NUBUS 250 + .nubus_type = MAC_NUBUS, 251 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 258 252 }, { 259 253 .ident = MAC_MODEL_IICX, 260 254 .name = "IIcx", ··· 263 255 .via_type = MAC_VIA_II, 264 256 .scsi_type = MAC_SCSI_OLD, 265 257 .scc_type = MAC_SCC_II, 266 - .nubus_type = MAC_NUBUS 258 + .nubus_type = MAC_NUBUS, 259 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 267 260 }, { 268 261 .ident = MAC_MODEL_SE30, 269 262 .name = "SE/30", ··· 272 263 .via_type = MAC_VIA_II, 273 264 .scsi_type = MAC_SCSI_OLD, 274 265 .scc_type = MAC_SCC_II, 275 - .nubus_type = MAC_NUBUS 266 + .nubus_type = MAC_NUBUS, 267 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 276 268 }, 277 269 278 270 /* ··· 290 280 .via_type = MAC_VIA_IIci, 291 281 .scsi_type = MAC_SCSI_OLD, 292 282 .scc_type = MAC_SCC_II, 293 - .nubus_type = MAC_NUBUS 283 + .nubus_type = MAC_NUBUS, 284 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 294 285 }, { 295 286 .ident = MAC_MODEL_IIFX, 296 287 .name = "IIfx", ··· 299 288 .via_type = MAC_VIA_IIci, 300 289 .scsi_type = MAC_SCSI_OLD, 301 290 .scc_type = MAC_SCC_IOP, 302 - .nubus_type = MAC_NUBUS 291 + .nubus_type = MAC_NUBUS, 292 + .floppy_type = MAC_FLOPPY_SWIM_IOP 303 293 }, { 304 294 .ident = MAC_MODEL_IISI, 305 295 .name = "IIsi", ··· 308 296 .via_type = MAC_VIA_IIci, 309 297 .scsi_type = MAC_SCSI_OLD, 310 298 .scc_type = MAC_SCC_II, 311 - .nubus_type = MAC_NUBUS 299 + .nubus_type = MAC_NUBUS, 300 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 312 301 }, { 313 302 .ident = MAC_MODEL_IIVI, 314 303 .name = "IIvi", ··· 317 304 .via_type = MAC_VIA_IIci, 318 305 .scsi_type = MAC_SCSI_OLD, 319 306 .scc_type = MAC_SCC_II, 320 - .nubus_type = MAC_NUBUS 307 + .nubus_type = MAC_NUBUS, 308 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 321 309 }, { 322 310 .ident = MAC_MODEL_IIVX, 323 311 .name = "IIvx", ··· 326 312 .via_type = MAC_VIA_IIci, 327 313 .scsi_type = MAC_SCSI_OLD, 328 314 .scc_type = MAC_SCC_II, 329 - .nubus_type = MAC_NUBUS 315 + .nubus_type = MAC_NUBUS, 316 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 330 317 }, 331 318 332 319 /* ··· 341 326 .via_type = MAC_VIA_IIci, 342 327 .scsi_type = MAC_SCSI_OLD, 343 328 .scc_type = MAC_SCC_II, 344 - .nubus_type = MAC_NUBUS 329 + .nubus_type = MAC_NUBUS, 330 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 345 331 }, { 346 332 .ident = MAC_MODEL_CCL, 347 333 .name = "Color Classic", ··· 350 334 .via_type = MAC_VIA_IIci, 351 335 .scsi_type = MAC_SCSI_OLD, 352 336 .scc_type = MAC_SCC_II, 353 - .nubus_type = MAC_NUBUS}, 337 + .nubus_type = MAC_NUBUS, 338 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 339 + }, 354 340 355 341 /* 356 342 * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi ··· 365 347 .via_type = MAC_VIA_IIci, 366 348 .scsi_type = MAC_SCSI_OLD, 367 349 .scc_type = MAC_SCC_II, 368 - .nubus_type = MAC_NUBUS 350 + .nubus_type = MAC_NUBUS, 351 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 369 352 }, { 370 353 .ident = MAC_MODEL_LCII, 371 354 .name = "LC II", ··· 374 355 .via_type = MAC_VIA_IIci, 375 356 .scsi_type = MAC_SCSI_OLD, 376 357 .scc_type = MAC_SCC_II, 377 - .nubus_type = MAC_NUBUS 358 + .nubus_type = MAC_NUBUS, 359 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 378 360 }, { 379 361 .ident = MAC_MODEL_LCIII, 380 362 .name = "LC III", ··· 383 363 .via_type = MAC_VIA_IIci, 384 364 .scsi_type = MAC_SCSI_OLD, 385 365 .scc_type = MAC_SCC_II, 386 - .nubus_type = MAC_NUBUS 366 + .nubus_type = MAC_NUBUS, 367 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 387 368 }, 388 369 389 370 /* ··· 404 383 .via_type = MAC_VIA_QUADRA, 405 384 .scsi_type = MAC_SCSI_QUADRA, 406 385 .scc_type = MAC_SCC_QUADRA, 407 - .nubus_type = MAC_NUBUS 386 + .nubus_type = MAC_NUBUS, 387 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 408 388 }, { 409 389 .ident = MAC_MODEL_Q605_ACC, 410 390 .name = "Quadra 605", ··· 413 391 .via_type = MAC_VIA_QUADRA, 414 392 .scsi_type = MAC_SCSI_QUADRA, 415 393 .scc_type = MAC_SCC_QUADRA, 416 - .nubus_type = MAC_NUBUS 394 + .nubus_type = MAC_NUBUS, 395 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 417 396 }, { 418 397 .ident = MAC_MODEL_Q610, 419 398 .name = "Quadra 610", ··· 423 400 .scsi_type = MAC_SCSI_QUADRA, 424 401 .scc_type = MAC_SCC_QUADRA, 425 402 .ether_type = MAC_ETHER_SONIC, 426 - .nubus_type = MAC_NUBUS 403 + .nubus_type = MAC_NUBUS, 404 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 427 405 }, { 428 406 .ident = MAC_MODEL_Q630, 429 407 .name = "Quadra 630", ··· 434 410 .ide_type = MAC_IDE_QUADRA, 435 411 .scc_type = MAC_SCC_QUADRA, 436 412 .ether_type = MAC_ETHER_SONIC, 437 - .nubus_type = MAC_NUBUS 413 + .nubus_type = MAC_NUBUS, 414 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 438 415 }, { 439 416 .ident = MAC_MODEL_Q650, 440 417 .name = "Quadra 650", ··· 444 419 .scsi_type = MAC_SCSI_QUADRA, 445 420 .scc_type = MAC_SCC_QUADRA, 446 421 .ether_type = MAC_ETHER_SONIC, 447 - .nubus_type = MAC_NUBUS 422 + .nubus_type = MAC_NUBUS, 423 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 448 424 }, 449 425 /* The Q700 does have a NS Sonic */ 450 426 { ··· 456 430 .scsi_type = MAC_SCSI_QUADRA2, 457 431 .scc_type = MAC_SCC_QUADRA, 458 432 .ether_type = MAC_ETHER_SONIC, 459 - .nubus_type = MAC_NUBUS 433 + .nubus_type = MAC_NUBUS, 434 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 460 435 }, { 461 436 .ident = MAC_MODEL_Q800, 462 437 .name = "Quadra 800", ··· 466 439 .scsi_type = MAC_SCSI_QUADRA, 467 440 .scc_type = MAC_SCC_QUADRA, 468 441 .ether_type = MAC_ETHER_SONIC, 469 - .nubus_type = MAC_NUBUS 442 + .nubus_type = MAC_NUBUS, 443 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 470 444 }, { 471 445 .ident = MAC_MODEL_Q840, 472 446 .name = "Quadra 840AV", ··· 476 448 .scsi_type = MAC_SCSI_QUADRA3, 477 449 .scc_type = MAC_SCC_PSC, 478 450 .ether_type = MAC_ETHER_MACE, 479 - .nubus_type = MAC_NUBUS 451 + .nubus_type = MAC_NUBUS, 452 + .floppy_type = MAC_FLOPPY_AV 480 453 }, { 481 454 .ident = MAC_MODEL_Q900, 482 455 .name = "Quadra 900", ··· 486 457 .scsi_type = MAC_SCSI_QUADRA2, 487 458 .scc_type = MAC_SCC_IOP, 488 459 .ether_type = MAC_ETHER_SONIC, 489 - .nubus_type = MAC_NUBUS 460 + .nubus_type = MAC_NUBUS, 461 + .floppy_type = MAC_FLOPPY_SWIM_IOP 490 462 }, { 491 463 .ident = MAC_MODEL_Q950, 492 464 .name = "Quadra 950", ··· 496 466 .scsi_type = MAC_SCSI_QUADRA2, 497 467 .scc_type = MAC_SCC_IOP, 498 468 .ether_type = MAC_ETHER_SONIC, 499 - .nubus_type = MAC_NUBUS 469 + .nubus_type = MAC_NUBUS, 470 + .floppy_type = MAC_FLOPPY_SWIM_IOP 500 471 }, 501 472 502 473 /* ··· 511 480 .via_type = MAC_VIA_IIci, 512 481 .scsi_type = MAC_SCSI_OLD, 513 482 .scc_type = MAC_SCC_II, 514 - .nubus_type = MAC_NUBUS 483 + .nubus_type = MAC_NUBUS, 484 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 515 485 }, { 516 486 .ident = MAC_MODEL_P475, 517 487 .name = "Performa 475", ··· 520 488 .via_type = MAC_VIA_QUADRA, 521 489 .scsi_type = MAC_SCSI_QUADRA, 522 490 .scc_type = MAC_SCC_II, 523 - .nubus_type = MAC_NUBUS 491 + .nubus_type = MAC_NUBUS, 492 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 524 493 }, { 525 494 .ident = MAC_MODEL_P475F, 526 495 .name = "Performa 475", ··· 529 496 .via_type = MAC_VIA_QUADRA, 530 497 .scsi_type = MAC_SCSI_QUADRA, 531 498 .scc_type = MAC_SCC_II, 532 - .nubus_type = MAC_NUBUS 499 + .nubus_type = MAC_NUBUS, 500 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 533 501 }, { 534 502 .ident = MAC_MODEL_P520, 535 503 .name = "Performa 520", ··· 538 504 .via_type = MAC_VIA_IIci, 539 505 .scsi_type = MAC_SCSI_OLD, 540 506 .scc_type = MAC_SCC_II, 541 - .nubus_type = MAC_NUBUS 507 + .nubus_type = MAC_NUBUS, 508 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 542 509 }, { 543 510 .ident = MAC_MODEL_P550, 544 511 .name = "Performa 550", ··· 547 512 .via_type = MAC_VIA_IIci, 548 513 .scsi_type = MAC_SCSI_OLD, 549 514 .scc_type = MAC_SCC_II, 550 - .nubus_type = MAC_NUBUS 515 + .nubus_type = MAC_NUBUS, 516 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 551 517 }, 552 518 /* These have the comm slot, and therefore the possibility of SONIC ethernet */ 553 519 { ··· 559 523 .scsi_type = MAC_SCSI_QUADRA, 560 524 .scc_type = MAC_SCC_II, 561 525 .ether_type = MAC_ETHER_SONIC, 562 - .nubus_type = MAC_NUBUS 526 + .nubus_type = MAC_NUBUS, 527 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 563 528 }, { 564 529 .ident = MAC_MODEL_P588, 565 530 .name = "Performa 588", ··· 570 533 .ide_type = MAC_IDE_QUADRA, 571 534 .scc_type = MAC_SCC_II, 572 535 .ether_type = MAC_ETHER_SONIC, 573 - .nubus_type = MAC_NUBUS 536 + .nubus_type = MAC_NUBUS, 537 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 574 538 }, { 575 539 .ident = MAC_MODEL_TV, 576 540 .name = "TV", ··· 579 541 .via_type = MAC_VIA_QUADRA, 580 542 .scsi_type = MAC_SCSI_OLD, 581 543 .scc_type = MAC_SCC_II, 582 - .nubus_type = MAC_NUBUS 544 + .nubus_type = MAC_NUBUS, 545 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 583 546 }, { 584 547 .ident = MAC_MODEL_P600, 585 548 .name = "Performa 600", ··· 588 549 .via_type = MAC_VIA_IIci, 589 550 .scsi_type = MAC_SCSI_OLD, 590 551 .scc_type = MAC_SCC_II, 591 - .nubus_type = MAC_NUBUS 552 + .nubus_type = MAC_NUBUS, 553 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 592 554 }, 593 555 594 556 /* ··· 605 565 .scsi_type = MAC_SCSI_QUADRA, 606 566 .scc_type = MAC_SCC_QUADRA, 607 567 .ether_type = MAC_ETHER_SONIC, 608 - .nubus_type = MAC_NUBUS 568 + .nubus_type = MAC_NUBUS, 569 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 609 570 }, { 610 571 .ident = MAC_MODEL_C650, 611 572 .name = "Centris 650", ··· 615 574 .scsi_type = MAC_SCSI_QUADRA, 616 575 .scc_type = MAC_SCC_QUADRA, 617 576 .ether_type = MAC_ETHER_SONIC, 618 - .nubus_type = MAC_NUBUS 577 + .nubus_type = MAC_NUBUS, 578 + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 619 579 }, { 620 580 .ident = MAC_MODEL_C660, 621 581 .name = "Centris 660AV", ··· 625 583 .scsi_type = MAC_SCSI_QUADRA3, 626 584 .scc_type = MAC_SCC_PSC, 627 585 .ether_type = MAC_ETHER_MACE, 628 - .nubus_type = MAC_NUBUS 586 + .nubus_type = MAC_NUBUS, 587 + .floppy_type = MAC_FLOPPY_AV 629 588 }, 630 589 631 590 /* ··· 642 599 .via_type = MAC_VIA_QUADRA, 643 600 .scsi_type = MAC_SCSI_OLD, 644 601 .scc_type = MAC_SCC_QUADRA, 645 - .nubus_type = MAC_NUBUS 602 + .nubus_type = MAC_NUBUS, 603 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 646 604 }, { 647 605 .ident = MAC_MODEL_PB145, 648 606 .name = "PowerBook 145", ··· 651 607 .via_type = MAC_VIA_QUADRA, 652 608 .scsi_type = MAC_SCSI_OLD, 653 609 .scc_type = MAC_SCC_QUADRA, 654 - .nubus_type = MAC_NUBUS 610 + .nubus_type = MAC_NUBUS, 611 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 655 612 }, { 656 613 .ident = MAC_MODEL_PB150, 657 614 .name = "PowerBook 150", ··· 661 616 .scsi_type = MAC_SCSI_OLD, 662 617 .ide_type = MAC_IDE_PB, 663 618 .scc_type = MAC_SCC_QUADRA, 664 - .nubus_type = MAC_NUBUS 619 + .nubus_type = MAC_NUBUS, 620 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 665 621 }, { 666 622 .ident = MAC_MODEL_PB160, 667 623 .name = "PowerBook 160", ··· 670 624 .via_type = MAC_VIA_QUADRA, 671 625 .scsi_type = MAC_SCSI_OLD, 672 626 .scc_type = MAC_SCC_QUADRA, 673 - .nubus_type = MAC_NUBUS 627 + .nubus_type = MAC_NUBUS, 628 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 674 629 }, { 675 630 .ident = MAC_MODEL_PB165, 676 631 .name = "PowerBook 165", ··· 679 632 .via_type = MAC_VIA_QUADRA, 680 633 .scsi_type = MAC_SCSI_OLD, 681 634 .scc_type = MAC_SCC_QUADRA, 682 - .nubus_type = MAC_NUBUS 635 + .nubus_type = MAC_NUBUS, 636 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 683 637 }, { 684 638 .ident = MAC_MODEL_PB165C, 685 639 .name = "PowerBook 165c", ··· 688 640 .via_type = MAC_VIA_QUADRA, 689 641 .scsi_type = MAC_SCSI_OLD, 690 642 .scc_type = MAC_SCC_QUADRA, 691 - .nubus_type = MAC_NUBUS 643 + .nubus_type = MAC_NUBUS, 644 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 692 645 }, { 693 646 .ident = MAC_MODEL_PB170, 694 647 .name = "PowerBook 170", ··· 697 648 .via_type = MAC_VIA_QUADRA, 698 649 .scsi_type = MAC_SCSI_OLD, 699 650 .scc_type = MAC_SCC_QUADRA, 700 - .nubus_type = MAC_NUBUS 651 + .nubus_type = MAC_NUBUS, 652 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 701 653 }, { 702 654 .ident = MAC_MODEL_PB180, 703 655 .name = "PowerBook 180", ··· 706 656 .via_type = MAC_VIA_QUADRA, 707 657 .scsi_type = MAC_SCSI_OLD, 708 658 .scc_type = MAC_SCC_QUADRA, 709 - .nubus_type = MAC_NUBUS 659 + .nubus_type = MAC_NUBUS, 660 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 710 661 }, { 711 662 .ident = MAC_MODEL_PB180C, 712 663 .name = "PowerBook 180c", ··· 715 664 .via_type = MAC_VIA_QUADRA, 716 665 .scsi_type = MAC_SCSI_OLD, 717 666 .scc_type = MAC_SCC_QUADRA, 718 - .nubus_type = MAC_NUBUS 667 + .nubus_type = MAC_NUBUS, 668 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 719 669 }, { 720 670 .ident = MAC_MODEL_PB190, 721 671 .name = "PowerBook 190", ··· 725 673 .scsi_type = MAC_SCSI_OLD, 726 674 .ide_type = MAC_IDE_BABOON, 727 675 .scc_type = MAC_SCC_QUADRA, 728 - .nubus_type = MAC_NUBUS 676 + .nubus_type = MAC_NUBUS, 677 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 729 678 }, { 730 679 .ident = MAC_MODEL_PB520, 731 680 .name = "PowerBook 520", ··· 735 682 .scsi_type = MAC_SCSI_OLD, 736 683 .scc_type = MAC_SCC_QUADRA, 737 684 .ether_type = MAC_ETHER_SONIC, 738 - .nubus_type = MAC_NUBUS 685 + .nubus_type = MAC_NUBUS, 686 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 739 687 }, 740 688 741 689 /* ··· 756 702 .via_type = MAC_VIA_IIci, 757 703 .scsi_type = MAC_SCSI_OLD, 758 704 .scc_type = MAC_SCC_QUADRA, 759 - .nubus_type = MAC_NUBUS 705 + .nubus_type = MAC_NUBUS, 706 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 760 707 }, { 761 708 .ident = MAC_MODEL_PB230, 762 709 .name = "PowerBook Duo 230", ··· 765 710 .via_type = MAC_VIA_IIci, 766 711 .scsi_type = MAC_SCSI_OLD, 767 712 .scc_type = MAC_SCC_QUADRA, 768 - .nubus_type = MAC_NUBUS 713 + .nubus_type = MAC_NUBUS, 714 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 769 715 }, { 770 716 .ident = MAC_MODEL_PB250, 771 717 .name = "PowerBook Duo 250", ··· 774 718 .via_type = MAC_VIA_IIci, 775 719 .scsi_type = MAC_SCSI_OLD, 776 720 .scc_type = MAC_SCC_QUADRA, 777 - .nubus_type = MAC_NUBUS 721 + .nubus_type = MAC_NUBUS, 722 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 778 723 }, { 779 724 .ident = MAC_MODEL_PB270C, 780 725 .name = "PowerBook Duo 270c", ··· 783 726 .via_type = MAC_VIA_IIci, 784 727 .scsi_type = MAC_SCSI_OLD, 785 728 .scc_type = MAC_SCC_QUADRA, 786 - .nubus_type = MAC_NUBUS 729 + .nubus_type = MAC_NUBUS, 730 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 787 731 }, { 788 732 .ident = MAC_MODEL_PB280, 789 733 .name = "PowerBook Duo 280", ··· 792 734 .via_type = MAC_VIA_IIci, 793 735 .scsi_type = MAC_SCSI_OLD, 794 736 .scc_type = MAC_SCC_QUADRA, 795 - .nubus_type = MAC_NUBUS 737 + .nubus_type = MAC_NUBUS, 738 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 796 739 }, { 797 740 .ident = MAC_MODEL_PB280C, 798 741 .name = "PowerBook Duo 280c", ··· 801 742 .via_type = MAC_VIA_IIci, 802 743 .scsi_type = MAC_SCSI_OLD, 803 744 .scc_type = MAC_SCC_QUADRA, 804 - .nubus_type = MAC_NUBUS 745 + .nubus_type = MAC_NUBUS, 746 + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 805 747 }, 806 748 807 749 /* ··· 875 815 strcpy(str, "Macintosh "); 876 816 strcat(str, macintosh_config->name); 877 817 } 818 + 819 + static struct resource swim_resources[1]; 820 + 821 + static struct platform_device swim_device = { 822 + .name = "swim", 823 + .id = -1, 824 + .num_resources = ARRAY_SIZE(swim_resources), 825 + .resource = swim_resources, 826 + }; 827 + 828 + static struct platform_device *mac_platform_devices[] __initdata = { 829 + &swim_device 830 + }; 831 + 832 + int __init mac_platform_init(void) 833 + { 834 + u8 *swim_base; 835 + 836 + switch (macintosh_config->floppy_type) { 837 + case MAC_FLOPPY_SWIM_ADDR1: 838 + swim_base = (u8 *)(VIA1_BASE + 0x1E000); 839 + break; 840 + case MAC_FLOPPY_SWIM_ADDR2: 841 + swim_base = (u8 *)(VIA1_BASE + 0x16000); 842 + break; 843 + default: 844 + return 0; 845 + } 846 + 847 + swim_resources[0].name = "swim-regs"; 848 + swim_resources[0].start = (resource_size_t)swim_base; 849 + swim_resources[0].end = (resource_size_t)(swim_base + SWIM_IO_SIZE); 850 + swim_resources[0].flags = IORESOURCE_MEM; 851 + 852 + return platform_add_devices(mac_platform_devices, 853 + ARRAY_SIZE(mac_platform_devices)); 854 + } 855 + 856 + arch_initcall(mac_platform_init);
+9
arch/m68k/mac/via.c
··· 645 645 } 646 646 return 0; 647 647 } 648 + 649 + void via1_set_head(int head) 650 + { 651 + if (head == 0) 652 + via1[vBufA] &= ~VIA1A_vHeadSel; 653 + else 654 + via1[vBufA] |= VIA1A_vHeadSel; 655 + } 656 + EXPORT_SYMBOL(via1_set_head);
+7
drivers/block/Kconfig
··· 45 45 If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple) 46 46 floppy controller, say Y here. Most commonly found in PowerMacs. 47 47 48 + config BLK_DEV_SWIM 49 + tristate "Support for SWIM Macintosh floppy" 50 + depends on M68K && MAC 51 + help 52 + You should select this option if you want floppy support 53 + and you don't have a II, IIfx, Q900, Q950 or AV series. 54 + 48 55 config AMIGA_Z2RAM 49 56 tristate "Amiga Zorro II ramdisk support" 50 57 depends on ZORRO
+3
drivers/block/Makefile
··· 6 6 # 7 7 8 8 obj-$(CONFIG_MAC_FLOPPY) += swim3.o 9 + obj-$(CONFIG_BLK_DEV_SWIM) += swim_mod.o 9 10 obj-$(CONFIG_BLK_DEV_FD) += floppy.o 10 11 obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o 11 12 obj-$(CONFIG_PS3_DISK) += ps3disk.o ··· 34 33 obj-$(CONFIG_BLK_DEV_HD) += hd.o 35 34 36 35 obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o 36 + 37 + swim_mod-objs := swim.o swim_asm.o
+995
drivers/block/swim.c
··· 1 + /* 2 + * Driver for SWIM (Sander Woz Integrated Machine) floppy controller 3 + * 4 + * Copyright (C) 2004,2008 Laurent Vivier <Laurent@lvivier.info> 5 + * 6 + * based on Alastair Bridgewater SWIM analysis, 2001 7 + * based on SWIM3 driver (c) Paul Mackerras, 1996 8 + * based on netBSD IWM driver (c) 1997, 1998 Hauke Fath. 9 + * 10 + * This program is free software; you can redistribute it and/or 11 + * modify it under the terms of the GNU General Public License 12 + * as published by the Free Software Foundation; either version 13 + * 2 of the License, or (at your option) any later version. 14 + * 15 + * 2004-08-21 (lv) - Initial implementation 16 + * 2008-10-30 (lv) - Port to 2.6 17 + */ 18 + 19 + #include <linux/module.h> 20 + #include <linux/fd.h> 21 + #include <linux/blkdev.h> 22 + #include <linux/hdreg.h> 23 + #include <linux/kernel.h> 24 + #include <linux/delay.h> 25 + #include <linux/platform_device.h> 26 + 27 + #include <asm/macintosh.h> 28 + #include <asm/mac_via.h> 29 + 30 + #define CARDNAME "swim" 31 + 32 + struct sector_header { 33 + unsigned char side; 34 + unsigned char track; 35 + unsigned char sector; 36 + unsigned char size; 37 + unsigned char crc0; 38 + unsigned char crc1; 39 + } __attribute__((packed)); 40 + 41 + #define DRIVER_VERSION "Version 0.2 (2008-10-30)" 42 + 43 + #define REG(x) unsigned char x, x ## _pad[0x200 - 1]; 44 + 45 + struct swim { 46 + REG(write_data) 47 + REG(write_mark) 48 + REG(write_CRC) 49 + REG(write_parameter) 50 + REG(write_phase) 51 + REG(write_setup) 52 + REG(write_mode0) 53 + REG(write_mode1) 54 + 55 + REG(read_data) 56 + REG(read_mark) 57 + REG(read_error) 58 + REG(read_parameter) 59 + REG(read_phase) 60 + REG(read_setup) 61 + REG(read_status) 62 + REG(read_handshake) 63 + } __attribute__((packed)); 64 + 65 + #define swim_write(base, reg, v) out_8(&(base)->write_##reg, (v)) 66 + #define swim_read(base, reg) in_8(&(base)->read_##reg) 67 + 68 + /* IWM registers */ 69 + 70 + struct iwm { 71 + REG(ph0L) 72 + REG(ph0H) 73 + REG(ph1L) 74 + REG(ph1H) 75 + REG(ph2L) 76 + REG(ph2H) 77 + REG(ph3L) 78 + REG(ph3H) 79 + REG(mtrOff) 80 + REG(mtrOn) 81 + REG(intDrive) 82 + REG(extDrive) 83 + REG(q6L) 84 + REG(q6H) 85 + REG(q7L) 86 + REG(q7H) 87 + } __attribute__((packed)); 88 + 89 + #define iwm_write(base, reg, v) out_8(&(base)->reg, (v)) 90 + #define iwm_read(base, reg) in_8(&(base)->reg) 91 + 92 + /* bits in phase register */ 93 + 94 + #define SEEK_POSITIVE 0x070 95 + #define SEEK_NEGATIVE 0x074 96 + #define STEP 0x071 97 + #define MOTOR_ON 0x072 98 + #define MOTOR_OFF 0x076 99 + #define INDEX 0x073 100 + #define EJECT 0x077 101 + #define SETMFM 0x171 102 + #define SETGCR 0x175 103 + 104 + #define RELAX 0x033 105 + #define LSTRB 0x008 106 + 107 + #define CA_MASK 0x077 108 + 109 + /* Select values for swim_select and swim_readbit */ 110 + 111 + #define READ_DATA_0 0x074 112 + #define TWOMEG_DRIVE 0x075 113 + #define SINGLE_SIDED 0x076 114 + #define DRIVE_PRESENT 0x077 115 + #define DISK_IN 0x170 116 + #define WRITE_PROT 0x171 117 + #define TRACK_ZERO 0x172 118 + #define TACHO 0x173 119 + #define READ_DATA_1 0x174 120 + #define MFM_MODE 0x175 121 + #define SEEK_COMPLETE 0x176 122 + #define ONEMEG_MEDIA 0x177 123 + 124 + /* Bits in handshake register */ 125 + 126 + #define MARK_BYTE 0x01 127 + #define CRC_ZERO 0x02 128 + #define RDDATA 0x04 129 + #define SENSE 0x08 130 + #define MOTEN 0x10 131 + #define ERROR 0x20 132 + #define DAT2BYTE 0x40 133 + #define DAT1BYTE 0x80 134 + 135 + /* bits in setup register */ 136 + 137 + #define S_INV_WDATA 0x01 138 + #define S_3_5_SELECT 0x02 139 + #define S_GCR 0x04 140 + #define S_FCLK_DIV2 0x08 141 + #define S_ERROR_CORR 0x10 142 + #define S_IBM_DRIVE 0x20 143 + #define S_GCR_WRITE 0x40 144 + #define S_TIMEOUT 0x80 145 + 146 + /* bits in mode register */ 147 + 148 + #define CLFIFO 0x01 149 + #define ENBL1 0x02 150 + #define ENBL2 0x04 151 + #define ACTION 0x08 152 + #define WRITE_MODE 0x10 153 + #define HEDSEL 0x20 154 + #define MOTON 0x80 155 + 156 + /*----------------------------------------------------------------------------*/ 157 + 158 + enum drive_location { 159 + INTERNAL_DRIVE = 0x02, 160 + EXTERNAL_DRIVE = 0x04, 161 + }; 162 + 163 + enum media_type { 164 + DD_MEDIA, 165 + HD_MEDIA, 166 + }; 167 + 168 + struct floppy_state { 169 + 170 + /* physical properties */ 171 + 172 + enum drive_location location; /* internal or external drive */ 173 + int head_number; /* single- or double-sided drive */ 174 + 175 + /* media */ 176 + 177 + int disk_in; 178 + int ejected; 179 + enum media_type type; 180 + int write_protected; 181 + 182 + int total_secs; 183 + int secpercyl; 184 + int secpertrack; 185 + 186 + /* in-use information */ 187 + 188 + int track; 189 + int ref_count; 190 + 191 + struct gendisk *disk; 192 + 193 + /* parent controller */ 194 + 195 + struct swim_priv *swd; 196 + }; 197 + 198 + enum motor_action { 199 + OFF, 200 + ON, 201 + }; 202 + 203 + enum head { 204 + LOWER_HEAD = 0, 205 + UPPER_HEAD = 1, 206 + }; 207 + 208 + #define FD_MAX_UNIT 2 209 + 210 + struct swim_priv { 211 + struct swim __iomem *base; 212 + spinlock_t lock; 213 + struct request_queue *queue; 214 + int floppy_count; 215 + struct floppy_state unit[FD_MAX_UNIT]; 216 + }; 217 + 218 + extern int swim_read_sector_header(struct swim __iomem *base, 219 + struct sector_header *header); 220 + extern int swim_read_sector_data(struct swim __iomem *base, 221 + unsigned char *data); 222 + 223 + static inline void set_swim_mode(struct swim __iomem *base, int enable) 224 + { 225 + struct iwm __iomem *iwm_base; 226 + unsigned long flags; 227 + 228 + if (!enable) { 229 + swim_write(base, mode0, 0xf8); 230 + return; 231 + } 232 + 233 + iwm_base = (struct iwm __iomem *)base; 234 + local_irq_save(flags); 235 + 236 + iwm_read(iwm_base, q7L); 237 + iwm_read(iwm_base, mtrOff); 238 + iwm_read(iwm_base, q6H); 239 + 240 + iwm_write(iwm_base, q7H, 0x57); 241 + iwm_write(iwm_base, q7H, 0x17); 242 + iwm_write(iwm_base, q7H, 0x57); 243 + iwm_write(iwm_base, q7H, 0x57); 244 + 245 + local_irq_restore(flags); 246 + } 247 + 248 + static inline int get_swim_mode(struct swim __iomem *base) 249 + { 250 + unsigned long flags; 251 + 252 + local_irq_save(flags); 253 + 254 + swim_write(base, phase, 0xf5); 255 + if (swim_read(base, phase) != 0xf5) 256 + goto is_iwm; 257 + swim_write(base, phase, 0xf6); 258 + if (swim_read(base, phase) != 0xf6) 259 + goto is_iwm; 260 + swim_write(base, phase, 0xf7); 261 + if (swim_read(base, phase) != 0xf7) 262 + goto is_iwm; 263 + local_irq_restore(flags); 264 + return 1; 265 + is_iwm: 266 + local_irq_restore(flags); 267 + return 0; 268 + } 269 + 270 + static inline void swim_select(struct swim __iomem *base, int sel) 271 + { 272 + swim_write(base, phase, RELAX); 273 + 274 + via1_set_head(sel & 0x100); 275 + 276 + swim_write(base, phase, sel & CA_MASK); 277 + } 278 + 279 + static inline void swim_action(struct swim __iomem *base, int action) 280 + { 281 + unsigned long flags; 282 + 283 + local_irq_save(flags); 284 + 285 + swim_select(base, action); 286 + udelay(1); 287 + swim_write(base, phase, (LSTRB<<4) | LSTRB); 288 + udelay(1); 289 + swim_write(base, phase, (LSTRB<<4) | ((~LSTRB) & 0x0F)); 290 + udelay(1); 291 + 292 + local_irq_restore(flags); 293 + } 294 + 295 + static inline int swim_readbit(struct swim __iomem *base, int bit) 296 + { 297 + int stat; 298 + 299 + swim_select(base, bit); 300 + 301 + udelay(10); 302 + 303 + stat = swim_read(base, handshake); 304 + 305 + return (stat & SENSE) == 0; 306 + } 307 + 308 + static inline void swim_drive(struct swim __iomem *base, 309 + enum drive_location location) 310 + { 311 + if (location == INTERNAL_DRIVE) { 312 + swim_write(base, mode0, EXTERNAL_DRIVE); /* clear drive 1 bit */ 313 + swim_write(base, mode1, INTERNAL_DRIVE); /* set drive 0 bit */ 314 + } else if (location == EXTERNAL_DRIVE) { 315 + swim_write(base, mode0, INTERNAL_DRIVE); /* clear drive 0 bit */ 316 + swim_write(base, mode1, EXTERNAL_DRIVE); /* set drive 1 bit */ 317 + } 318 + } 319 + 320 + static inline void swim_motor(struct swim __iomem *base, 321 + enum motor_action action) 322 + { 323 + if (action == ON) { 324 + int i; 325 + 326 + swim_action(base, MOTOR_ON); 327 + 328 + for (i = 0; i < 2*HZ; i++) { 329 + swim_select(base, RELAX); 330 + if (swim_readbit(base, MOTOR_ON)) 331 + break; 332 + current->state = TASK_INTERRUPTIBLE; 333 + schedule_timeout(1); 334 + } 335 + } else if (action == OFF) { 336 + swim_action(base, MOTOR_OFF); 337 + swim_select(base, RELAX); 338 + } 339 + } 340 + 341 + static inline void swim_eject(struct swim __iomem *base) 342 + { 343 + int i; 344 + 345 + swim_action(base, EJECT); 346 + 347 + for (i = 0; i < 2*HZ; i++) { 348 + swim_select(base, RELAX); 349 + if (!swim_readbit(base, DISK_IN)) 350 + break; 351 + current->state = TASK_INTERRUPTIBLE; 352 + schedule_timeout(1); 353 + } 354 + swim_select(base, RELAX); 355 + } 356 + 357 + static inline void swim_head(struct swim __iomem *base, enum head head) 358 + { 359 + /* wait drive is ready */ 360 + 361 + if (head == UPPER_HEAD) 362 + swim_select(base, READ_DATA_1); 363 + else if (head == LOWER_HEAD) 364 + swim_select(base, READ_DATA_0); 365 + } 366 + 367 + static inline int swim_step(struct swim __iomem *base) 368 + { 369 + int wait; 370 + 371 + swim_action(base, STEP); 372 + 373 + for (wait = 0; wait < HZ; wait++) { 374 + 375 + current->state = TASK_INTERRUPTIBLE; 376 + schedule_timeout(1); 377 + 378 + swim_select(base, RELAX); 379 + if (!swim_readbit(base, STEP)) 380 + return 0; 381 + } 382 + return -1; 383 + } 384 + 385 + static inline int swim_track00(struct swim __iomem *base) 386 + { 387 + int try; 388 + 389 + swim_action(base, SEEK_NEGATIVE); 390 + 391 + for (try = 0; try < 100; try++) { 392 + 393 + swim_select(base, RELAX); 394 + if (swim_readbit(base, TRACK_ZERO)) 395 + break; 396 + 397 + if (swim_step(base)) 398 + return -1; 399 + } 400 + 401 + if (swim_readbit(base, TRACK_ZERO)) 402 + return 0; 403 + 404 + return -1; 405 + } 406 + 407 + static inline int swim_seek(struct swim __iomem *base, int step) 408 + { 409 + if (step == 0) 410 + return 0; 411 + 412 + if (step < 0) { 413 + swim_action(base, SEEK_NEGATIVE); 414 + step = -step; 415 + } else 416 + swim_action(base, SEEK_POSITIVE); 417 + 418 + for ( ; step > 0; step--) { 419 + if (swim_step(base)) 420 + return -1; 421 + } 422 + 423 + return 0; 424 + } 425 + 426 + static inline int swim_track(struct floppy_state *fs, int track) 427 + { 428 + struct swim __iomem *base = fs->swd->base; 429 + int ret; 430 + 431 + ret = swim_seek(base, track - fs->track); 432 + 433 + if (ret == 0) 434 + fs->track = track; 435 + else { 436 + swim_track00(base); 437 + fs->track = 0; 438 + } 439 + 440 + return ret; 441 + } 442 + 443 + static int floppy_eject(struct floppy_state *fs) 444 + { 445 + struct swim __iomem *base = fs->swd->base; 446 + 447 + swim_drive(base, fs->location); 448 + swim_motor(base, OFF); 449 + swim_eject(base); 450 + 451 + fs->disk_in = 0; 452 + fs->ejected = 1; 453 + 454 + return 0; 455 + } 456 + 457 + static inline int swim_read_sector(struct floppy_state *fs, 458 + int side, int track, 459 + int sector, unsigned char *buffer) 460 + { 461 + struct swim __iomem *base = fs->swd->base; 462 + unsigned long flags; 463 + struct sector_header header; 464 + int ret = -1; 465 + short i; 466 + 467 + swim_track(fs, track); 468 + 469 + swim_write(base, mode1, MOTON); 470 + swim_head(base, side); 471 + swim_write(base, mode0, side); 472 + 473 + local_irq_save(flags); 474 + for (i = 0; i < 36; i++) { 475 + ret = swim_read_sector_header(base, &header); 476 + if (!ret && (header.sector == sector)) { 477 + /* found */ 478 + 479 + ret = swim_read_sector_data(base, buffer); 480 + break; 481 + } 482 + } 483 + local_irq_restore(flags); 484 + 485 + swim_write(base, mode0, MOTON); 486 + 487 + if ((header.side != side) || (header.track != track) || 488 + (header.sector != sector)) 489 + return 0; 490 + 491 + return ret; 492 + } 493 + 494 + static int floppy_read_sectors(struct floppy_state *fs, 495 + int req_sector, int sectors_nb, 496 + unsigned char *buffer) 497 + { 498 + struct swim __iomem *base = fs->swd->base; 499 + int ret; 500 + int side, track, sector; 501 + int i, try; 502 + 503 + 504 + swim_drive(base, fs->location); 505 + for (i = req_sector; i < req_sector + sectors_nb; i++) { 506 + int x; 507 + track = i / fs->secpercyl; 508 + x = i % fs->secpercyl; 509 + side = x / fs->secpertrack; 510 + sector = x % fs->secpertrack + 1; 511 + 512 + try = 5; 513 + do { 514 + ret = swim_read_sector(fs, side, track, sector, 515 + buffer); 516 + if (try-- == 0) 517 + return -1; 518 + } while (ret != 512); 519 + 520 + buffer += ret; 521 + } 522 + 523 + return 0; 524 + } 525 + 526 + static void redo_fd_request(struct request_queue *q) 527 + { 528 + struct request *req; 529 + struct floppy_state *fs; 530 + 531 + while ((req = elv_next_request(q))) { 532 + 533 + fs = req->rq_disk->private_data; 534 + if (req->sector < 0 || req->sector >= fs->total_secs) { 535 + end_request(req, 0); 536 + continue; 537 + } 538 + if (req->current_nr_sectors == 0) { 539 + end_request(req, 1); 540 + continue; 541 + } 542 + if (!fs->disk_in) { 543 + end_request(req, 0); 544 + continue; 545 + } 546 + if (rq_data_dir(req) == WRITE) { 547 + if (fs->write_protected) { 548 + end_request(req, 0); 549 + continue; 550 + } 551 + } 552 + switch (rq_data_dir(req)) { 553 + case WRITE: 554 + /* NOT IMPLEMENTED */ 555 + end_request(req, 0); 556 + break; 557 + case READ: 558 + if (floppy_read_sectors(fs, req->sector, 559 + req->current_nr_sectors, 560 + req->buffer)) { 561 + end_request(req, 0); 562 + continue; 563 + } 564 + req->nr_sectors -= req->current_nr_sectors; 565 + req->sector += req->current_nr_sectors; 566 + req->buffer += req->current_nr_sectors * 512; 567 + end_request(req, 1); 568 + break; 569 + } 570 + } 571 + } 572 + 573 + static void do_fd_request(struct request_queue *q) 574 + { 575 + redo_fd_request(q); 576 + } 577 + 578 + static struct floppy_struct floppy_type[4] = { 579 + { 0, 0, 0, 0, 0, 0x00, 0x00, 0x00, 0x00, NULL }, /* no testing */ 580 + { 720, 9, 1, 80, 0, 0x2A, 0x02, 0xDF, 0x50, NULL }, /* 360KB SS 3.5"*/ 581 + { 1440, 9, 2, 80, 0, 0x2A, 0x02, 0xDF, 0x50, NULL }, /* 720KB 3.5" */ 582 + { 2880, 18, 2, 80, 0, 0x1B, 0x00, 0xCF, 0x6C, NULL }, /* 1.44MB 3.5" */ 583 + }; 584 + 585 + static int get_floppy_geometry(struct floppy_state *fs, int type, 586 + struct floppy_struct **g) 587 + { 588 + if (type >= ARRAY_SIZE(floppy_type)) 589 + return -EINVAL; 590 + 591 + if (type) 592 + *g = &floppy_type[type]; 593 + else if (fs->type == HD_MEDIA) /* High-Density media */ 594 + *g = &floppy_type[3]; 595 + else if (fs->head_number == 2) /* double-sided */ 596 + *g = &floppy_type[2]; 597 + else 598 + *g = &floppy_type[1]; 599 + 600 + return 0; 601 + } 602 + 603 + static void setup_medium(struct floppy_state *fs) 604 + { 605 + struct swim __iomem *base = fs->swd->base; 606 + 607 + if (swim_readbit(base, DISK_IN)) { 608 + struct floppy_struct *g; 609 + fs->disk_in = 1; 610 + fs->write_protected = swim_readbit(base, WRITE_PROT); 611 + fs->type = swim_readbit(base, ONEMEG_MEDIA); 612 + 613 + if (swim_track00(base)) 614 + printk(KERN_ERR 615 + "SWIM: cannot move floppy head to track 0\n"); 616 + 617 + swim_track00(base); 618 + 619 + get_floppy_geometry(fs, 0, &g); 620 + fs->total_secs = g->size; 621 + fs->secpercyl = g->head * g->sect; 622 + fs->secpertrack = g->sect; 623 + fs->track = 0; 624 + } else { 625 + fs->disk_in = 0; 626 + } 627 + } 628 + 629 + static int floppy_open(struct block_device *bdev, fmode_t mode) 630 + { 631 + struct floppy_state *fs = bdev->bd_disk->private_data; 632 + struct swim __iomem *base = fs->swd->base; 633 + int err; 634 + 635 + if (fs->ref_count == -1 || (fs->ref_count && mode & FMODE_EXCL)) 636 + return -EBUSY; 637 + 638 + if (mode & FMODE_EXCL) 639 + fs->ref_count = -1; 640 + else 641 + fs->ref_count++; 642 + 643 + swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2); 644 + udelay(10); 645 + swim_drive(base, INTERNAL_DRIVE); 646 + swim_motor(base, ON); 647 + swim_action(base, SETMFM); 648 + if (fs->ejected) 649 + setup_medium(fs); 650 + if (!fs->disk_in) { 651 + err = -ENXIO; 652 + goto out; 653 + } 654 + 655 + if (mode & FMODE_NDELAY) 656 + return 0; 657 + 658 + if (mode & (FMODE_READ|FMODE_WRITE)) { 659 + check_disk_change(bdev); 660 + if ((mode & FMODE_WRITE) && fs->write_protected) { 661 + err = -EROFS; 662 + goto out; 663 + } 664 + } 665 + return 0; 666 + out: 667 + if (fs->ref_count < 0) 668 + fs->ref_count = 0; 669 + else if (fs->ref_count > 0) 670 + --fs->ref_count; 671 + 672 + if (fs->ref_count == 0) 673 + swim_motor(base, OFF); 674 + return err; 675 + } 676 + 677 + static int floppy_release(struct gendisk *disk, fmode_t mode) 678 + { 679 + struct floppy_state *fs = disk->private_data; 680 + struct swim __iomem *base = fs->swd->base; 681 + 682 + if (fs->ref_count < 0) 683 + fs->ref_count = 0; 684 + else if (fs->ref_count > 0) 685 + --fs->ref_count; 686 + 687 + if (fs->ref_count == 0) 688 + swim_motor(base, OFF); 689 + 690 + return 0; 691 + } 692 + 693 + static int floppy_ioctl(struct block_device *bdev, fmode_t mode, 694 + unsigned int cmd, unsigned long param) 695 + { 696 + struct floppy_state *fs = bdev->bd_disk->private_data; 697 + int err; 698 + 699 + if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN)) 700 + return -EPERM; 701 + 702 + switch (cmd) { 703 + case FDEJECT: 704 + if (fs->ref_count != 1) 705 + return -EBUSY; 706 + err = floppy_eject(fs); 707 + return err; 708 + 709 + case FDGETPRM: 710 + if (copy_to_user((void __user *) param, (void *) &floppy_type, 711 + sizeof(struct floppy_struct))) 712 + return -EFAULT; 713 + break; 714 + 715 + default: 716 + printk(KERN_DEBUG "SWIM floppy_ioctl: unknown cmd %d\n", 717 + cmd); 718 + return -ENOSYS; 719 + } 720 + return 0; 721 + } 722 + 723 + static int floppy_getgeo(struct block_device *bdev, struct hd_geometry *geo) 724 + { 725 + struct floppy_state *fs = bdev->bd_disk->private_data; 726 + struct floppy_struct *g; 727 + int ret; 728 + 729 + ret = get_floppy_geometry(fs, 0, &g); 730 + if (ret) 731 + return ret; 732 + 733 + geo->heads = g->head; 734 + geo->sectors = g->sect; 735 + geo->cylinders = g->track; 736 + 737 + return 0; 738 + } 739 + 740 + static int floppy_check_change(struct gendisk *disk) 741 + { 742 + struct floppy_state *fs = disk->private_data; 743 + 744 + return fs->ejected; 745 + } 746 + 747 + static int floppy_revalidate(struct gendisk *disk) 748 + { 749 + struct floppy_state *fs = disk->private_data; 750 + struct swim __iomem *base = fs->swd->base; 751 + 752 + swim_drive(base, fs->location); 753 + 754 + if (fs->ejected) 755 + setup_medium(fs); 756 + 757 + if (!fs->disk_in) 758 + swim_motor(base, OFF); 759 + else 760 + fs->ejected = 0; 761 + 762 + return !fs->disk_in; 763 + } 764 + 765 + static struct block_device_operations floppy_fops = { 766 + .owner = THIS_MODULE, 767 + .open = floppy_open, 768 + .release = floppy_release, 769 + .locked_ioctl = floppy_ioctl, 770 + .getgeo = floppy_getgeo, 771 + .media_changed = floppy_check_change, 772 + .revalidate_disk = floppy_revalidate, 773 + }; 774 + 775 + static struct kobject *floppy_find(dev_t dev, int *part, void *data) 776 + { 777 + struct swim_priv *swd = data; 778 + int drive = (*part & 3); 779 + 780 + if (drive > swd->floppy_count) 781 + return NULL; 782 + 783 + *part = 0; 784 + return get_disk(swd->unit[drive].disk); 785 + } 786 + 787 + static int __devinit swim_add_floppy(struct swim_priv *swd, 788 + enum drive_location location) 789 + { 790 + struct floppy_state *fs = &swd->unit[swd->floppy_count]; 791 + struct swim __iomem *base = swd->base; 792 + 793 + fs->location = location; 794 + 795 + swim_drive(base, location); 796 + 797 + swim_motor(base, OFF); 798 + 799 + if (swim_readbit(base, SINGLE_SIDED)) 800 + fs->head_number = 1; 801 + else 802 + fs->head_number = 2; 803 + fs->ref_count = 0; 804 + fs->ejected = 1; 805 + 806 + swd->floppy_count++; 807 + 808 + return 0; 809 + } 810 + 811 + static int __devinit swim_floppy_init(struct swim_priv *swd) 812 + { 813 + int err; 814 + int drive; 815 + struct swim __iomem *base = swd->base; 816 + 817 + /* scan floppy drives */ 818 + 819 + swim_drive(base, INTERNAL_DRIVE); 820 + if (swim_readbit(base, DRIVE_PRESENT)) 821 + swim_add_floppy(swd, INTERNAL_DRIVE); 822 + swim_drive(base, EXTERNAL_DRIVE); 823 + if (swim_readbit(base, DRIVE_PRESENT)) 824 + swim_add_floppy(swd, EXTERNAL_DRIVE); 825 + 826 + /* register floppy drives */ 827 + 828 + err = register_blkdev(FLOPPY_MAJOR, "fd"); 829 + if (err) { 830 + printk(KERN_ERR "Unable to get major %d for SWIM floppy\n", 831 + FLOPPY_MAJOR); 832 + return -EBUSY; 833 + } 834 + 835 + for (drive = 0; drive < swd->floppy_count; drive++) { 836 + swd->unit[drive].disk = alloc_disk(1); 837 + if (swd->unit[drive].disk == NULL) { 838 + err = -ENOMEM; 839 + goto exit_put_disks; 840 + } 841 + swd->unit[drive].swd = swd; 842 + } 843 + 844 + swd->queue = blk_init_queue(do_fd_request, &swd->lock); 845 + if (!swd->queue) { 846 + err = -ENOMEM; 847 + goto exit_put_disks; 848 + } 849 + 850 + for (drive = 0; drive < swd->floppy_count; drive++) { 851 + swd->unit[drive].disk->flags = GENHD_FL_REMOVABLE; 852 + swd->unit[drive].disk->major = FLOPPY_MAJOR; 853 + swd->unit[drive].disk->first_minor = drive; 854 + sprintf(swd->unit[drive].disk->disk_name, "fd%d", drive); 855 + swd->unit[drive].disk->fops = &floppy_fops; 856 + swd->unit[drive].disk->private_data = &swd->unit[drive]; 857 + swd->unit[drive].disk->queue = swd->queue; 858 + set_capacity(swd->unit[drive].disk, 2880); 859 + add_disk(swd->unit[drive].disk); 860 + } 861 + 862 + blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE, 863 + floppy_find, NULL, swd); 864 + 865 + return 0; 866 + 867 + exit_put_disks: 868 + unregister_blkdev(FLOPPY_MAJOR, "fd"); 869 + while (drive--) 870 + put_disk(swd->unit[drive].disk); 871 + return err; 872 + } 873 + 874 + static int __devinit swim_probe(struct platform_device *dev) 875 + { 876 + struct resource *res; 877 + struct swim __iomem *swim_base; 878 + struct swim_priv *swd; 879 + int ret; 880 + 881 + res = platform_get_resource_byname(dev, IORESOURCE_MEM, "swim-regs"); 882 + if (!res) { 883 + ret = -ENODEV; 884 + goto out; 885 + } 886 + 887 + if (!request_mem_region(res->start, resource_size(res), CARDNAME)) { 888 + ret = -EBUSY; 889 + goto out; 890 + } 891 + 892 + swim_base = ioremap(res->start, resource_size(res)); 893 + if (!swim_base) { 894 + return -ENOMEM; 895 + goto out_release_io; 896 + } 897 + 898 + /* probe device */ 899 + 900 + set_swim_mode(swim_base, 1); 901 + if (!get_swim_mode(swim_base)) { 902 + printk(KERN_INFO "SWIM device not found !\n"); 903 + ret = -ENODEV; 904 + goto out_iounmap; 905 + } 906 + 907 + /* set platform driver data */ 908 + 909 + swd = kzalloc(sizeof(struct swim_priv), GFP_KERNEL); 910 + if (!swd) { 911 + ret = -ENOMEM; 912 + goto out_iounmap; 913 + } 914 + platform_set_drvdata(dev, swd); 915 + 916 + swd->base = swim_base; 917 + 918 + ret = swim_floppy_init(swd); 919 + if (ret) 920 + goto out_kfree; 921 + 922 + return 0; 923 + 924 + out_kfree: 925 + platform_set_drvdata(dev, NULL); 926 + kfree(swd); 927 + out_iounmap: 928 + iounmap(swim_base); 929 + out_release_io: 930 + release_mem_region(res->start, resource_size(res)); 931 + out: 932 + return ret; 933 + } 934 + 935 + static int __devexit swim_remove(struct platform_device *dev) 936 + { 937 + struct swim_priv *swd = platform_get_drvdata(dev); 938 + int drive; 939 + struct resource *res; 940 + 941 + blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); 942 + 943 + for (drive = 0; drive < swd->floppy_count; drive++) { 944 + del_gendisk(swd->unit[drive].disk); 945 + put_disk(swd->unit[drive].disk); 946 + } 947 + 948 + unregister_blkdev(FLOPPY_MAJOR, "fd"); 949 + 950 + blk_cleanup_queue(swd->queue); 951 + 952 + /* eject floppies */ 953 + 954 + for (drive = 0; drive < swd->floppy_count; drive++) 955 + floppy_eject(&swd->unit[drive]); 956 + 957 + iounmap(swd->base); 958 + 959 + res = platform_get_resource_byname(dev, IORESOURCE_MEM, "swim-regs"); 960 + if (res) 961 + release_mem_region(res->start, resource_size(res)); 962 + 963 + platform_set_drvdata(dev, NULL); 964 + kfree(swd); 965 + 966 + return 0; 967 + } 968 + 969 + static struct platform_driver swim_driver = { 970 + .probe = swim_probe, 971 + .remove = __devexit_p(swim_remove), 972 + .driver = { 973 + .name = CARDNAME, 974 + .owner = THIS_MODULE, 975 + }, 976 + }; 977 + 978 + static int __init swim_init(void) 979 + { 980 + printk(KERN_INFO "SWIM floppy driver %s\n", DRIVER_VERSION); 981 + 982 + return platform_driver_register(&swim_driver); 983 + } 984 + module_init(swim_init); 985 + 986 + static void __exit swim_exit(void) 987 + { 988 + platform_driver_unregister(&swim_driver); 989 + } 990 + module_exit(swim_exit); 991 + 992 + MODULE_DESCRIPTION("Driver for SWIM floppy controller"); 993 + MODULE_LICENSE("GPL"); 994 + MODULE_AUTHOR("Laurent Vivier <laurent@lvivier.info>"); 995 + MODULE_ALIAS_BLOCKDEV_MAJOR(FLOPPY_MAJOR);
+247
drivers/block/swim_asm.S
··· 1 + /* 2 + * low-level functions for the SWIM floppy controller 3 + * 4 + * needs assembly language because is very timing dependent 5 + * this controller exists only on macintosh 680x0 based 6 + * 7 + * Copyright (C) 2004,2008 Laurent Vivier <Laurent@lvivier.info> 8 + * 9 + * based on Alastair Bridgewater SWIM analysis, 2001 10 + * based on netBSD IWM driver (c) 1997, 1998 Hauke Fath. 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 15 + * 2 of the License, or (at your option) any later version. 16 + * 17 + * 2004-08-21 (lv) - Initial implementation 18 + * 2008-11-05 (lv) - add get_swim_mode 19 + */ 20 + 21 + .equ write_data, 0x0000 22 + .equ write_mark, 0x0200 23 + .equ write_CRC, 0x0400 24 + .equ write_parameter,0x0600 25 + .equ write_phase, 0x0800 26 + .equ write_setup, 0x0a00 27 + .equ write_mode0, 0x0c00 28 + .equ write_mode1, 0x0e00 29 + .equ read_data, 0x1000 30 + .equ read_mark, 0x1200 31 + .equ read_error, 0x1400 32 + .equ read_parameter, 0x1600 33 + .equ read_phase, 0x1800 34 + .equ read_setup, 0x1a00 35 + .equ read_status, 0x1c00 36 + .equ read_handshake, 0x1e00 37 + 38 + .equ o_side, 0 39 + .equ o_track, 1 40 + .equ o_sector, 2 41 + .equ o_size, 3 42 + .equ o_crc0, 4 43 + .equ o_crc1, 5 44 + 45 + .equ seek_time, 30000 46 + .equ max_retry, 40 47 + .equ sector_size, 512 48 + 49 + .global swim_read_sector_header 50 + swim_read_sector_header: 51 + link %a6, #0 52 + moveml %d1-%d5/%a0-%a4,%sp@- 53 + movel %a6@(0x0c), %a4 54 + bsr mfm_read_addrmark 55 + moveml %sp@+, %d1-%d5/%a0-%a4 56 + unlk %a6 57 + rts 58 + 59 + sector_address_mark: 60 + .byte 0xa1, 0xa1, 0xa1, 0xfe 61 + sector_data_mark: 62 + .byte 0xa1, 0xa1, 0xa1, 0xfb 63 + 64 + mfm_read_addrmark: 65 + movel %a6@(0x08), %a3 66 + lea %a3@(read_handshake), %a2 67 + lea %a3@(read_mark), %a3 68 + moveq #-1, %d0 69 + movew #seek_time, %d2 70 + 71 + wait_header_init: 72 + tstb %a3@(read_error - read_mark) 73 + moveb #0x18, %a3@(write_mode0 - read_mark) 74 + moveb #0x01, %a3@(write_mode1 - read_mark) 75 + moveb #0x01, %a3@(write_mode0 - read_mark) 76 + tstb %a3@(read_error - read_mark) 77 + moveb #0x08, %a3@(write_mode1 - read_mark) 78 + 79 + lea sector_address_mark, %a0 80 + moveq #3, %d1 81 + 82 + wait_addr_mark_byte: 83 + 84 + tstb %a2@ 85 + dbmi %d2, wait_addr_mark_byte 86 + bpl header_exit 87 + 88 + moveb %a3@, %d3 89 + cmpb %a0@+, %d3 90 + dbne %d1, wait_addr_mark_byte 91 + bne wait_header_init 92 + 93 + moveq #max_retry, %d2 94 + 95 + amark0: tstb %a2@ 96 + dbmi %d2, amark0 97 + bpl signal_nonyb 98 + 99 + moveb %a3@, %a4@(o_track) 100 + 101 + moveq #max_retry, %d2 102 + 103 + amark1: tstb %a2@ 104 + dbmi %d2, amark1 105 + bpl signal_nonyb 106 + 107 + moveb %a3@, %a4@(o_side) 108 + 109 + moveq #max_retry, %d2 110 + 111 + amark2: tstb %a2@ 112 + dbmi %d2, amark2 113 + bpl signal_nonyb 114 + 115 + moveb %a3@, %a4@(o_sector) 116 + 117 + moveq #max_retry, %d2 118 + 119 + amark3: tstb %a2@ 120 + dbmi %d2, amark3 121 + bpl signal_nonyb 122 + 123 + moveb %a3@, %a4@(o_size) 124 + 125 + moveq #max_retry, %d2 126 + 127 + crc0: tstb %a2@ 128 + dbmi %d2, crc0 129 + bpl signal_nonyb 130 + 131 + moveb %a3@, %a4@(o_crc0) 132 + 133 + moveq #max_retry, %d2 134 + 135 + crc1: tstb %a2@ 136 + dbmi %d2, crc1 137 + bpl signal_nonyb 138 + 139 + moveb %a3@, %a4@(o_crc1) 140 + 141 + tstb %a3@(read_error - read_mark) 142 + 143 + header_exit: 144 + moveq #0, %d0 145 + moveb #0x18, %a3@(write_mode0 - read_mark) 146 + rts 147 + signal_nonyb: 148 + moveq #-1, %d0 149 + moveb #0x18, %a3@(write_mode0 - read_mark) 150 + rts 151 + 152 + .global swim_read_sector_data 153 + swim_read_sector_data: 154 + link %a6, #0 155 + moveml %d1-%d5/%a0-%a5,%sp@- 156 + movel %a6@(0x0c), %a4 157 + bsr mfm_read_data 158 + moveml %sp@+, %d1-%d5/%a0-%a5 159 + unlk %a6 160 + rts 161 + 162 + mfm_read_data: 163 + movel %a6@(0x08), %a3 164 + lea %a3@(read_handshake), %a2 165 + lea %a3@(read_data), %a5 166 + lea %a3@(read_mark), %a3 167 + movew #seek_time, %d2 168 + 169 + wait_data_init: 170 + tstb %a3@(read_error - read_mark) 171 + moveb #0x18, %a3@(write_mode0 - read_mark) 172 + moveb #0x01, %a3@(write_mode1 - read_mark) 173 + moveb #0x01, %a3@(write_mode0 - read_mark) 174 + tstb %a3@(read_error - read_mark) 175 + moveb #0x08, %a3@(write_mode1 - read_mark) 176 + 177 + lea sector_data_mark, %a0 178 + moveq #3, %d1 179 + 180 + /* wait data address mark */ 181 + 182 + wait_data_mark_byte: 183 + 184 + tstb %a2@ 185 + dbmi %d2, wait_data_mark_byte 186 + bpl data_exit 187 + 188 + moveb %a3@, %d3 189 + cmpb %a0@+, %d3 190 + dbne %d1, wait_data_mark_byte 191 + bne wait_data_init 192 + 193 + /* read data */ 194 + 195 + tstb %a3@(read_error - read_mark) 196 + 197 + movel #sector_size-1, %d4 /* sector size */ 198 + read_new_data: 199 + movew #max_retry, %d2 200 + read_data_loop: 201 + moveb %a2@, %d5 202 + andb #0xc0, %d5 203 + dbne %d2, read_data_loop 204 + beq data_exit 205 + moveb %a5@, %a4@+ 206 + andb #0x40, %d5 207 + dbne %d4, read_new_data 208 + beq exit_loop 209 + moveb %a5@, %a4@+ 210 + dbra %d4, read_new_data 211 + exit_loop: 212 + 213 + /* read CRC */ 214 + 215 + movew #max_retry, %d2 216 + data_crc0: 217 + 218 + tstb %a2@ 219 + dbmi %d2, data_crc0 220 + bpl data_exit 221 + 222 + moveb %a3@, %d5 223 + 224 + moveq #max_retry, %d2 225 + 226 + data_crc1: 227 + 228 + tstb %a2@ 229 + dbmi %d2, data_crc1 230 + bpl data_exit 231 + 232 + moveb %a3@, %d5 233 + 234 + tstb %a3@(read_error - read_mark) 235 + 236 + moveb #0x18, %a3@(write_mode0 - read_mark) 237 + 238 + /* return number of bytes read */ 239 + 240 + movel #sector_size, %d0 241 + addw #1, %d4 242 + subl %d4, %d0 243 + rts 244 + data_exit: 245 + moveb #0x18, %a3@(write_mode0 - read_mark) 246 + moveq #-1, %d0 247 + rts
+1 -1
drivers/scsi/atari_NCR5380.c
··· 844 844 * 845 845 */ 846 846 847 - static int NCR5380_init(struct Scsi_Host *instance, int flags) 847 + static int __init NCR5380_init(struct Scsi_Host *instance, int flags) 848 848 { 849 849 int i; 850 850 SETUP_HOSTDATA(instance);
+1 -1
drivers/scsi/atari_scsi.c
··· 589 589 #endif 590 590 591 591 592 - int atari_scsi_detect(struct scsi_host_template *host) 592 + int __init atari_scsi_detect(struct scsi_host_template *host) 593 593 { 594 594 static int called = 0; 595 595 struct Scsi_Host *instance;
+2 -2
sound/oss/dmasound/dmasound_atari.c
··· 1524 1524 .speed = 8000 1525 1525 } ; 1526 1526 1527 - static MACHINE machTT = { 1527 + static __initdata MACHINE machTT = { 1528 1528 .name = "Atari", 1529 1529 .name2 = "TT", 1530 1530 .owner = THIS_MODULE, ··· 1553 1553 .capabilities = DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ 1554 1554 }; 1555 1555 1556 - static MACHINE machFalcon = { 1556 + static __initdata MACHINE machFalcon = { 1557 1557 .name = "Atari", 1558 1558 .name2 = "FALCON", 1559 1559 .dma_alloc = AtaAlloc,