floppy-no.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * This file is subject to the terms and conditions of the GNU General Public
  3.  * License.  See the file "COPYING" in the main directory of this archive
  4.  * for more details.
  5.  *
  6.  * Dummy file for machines without standard floppy drives.
  7.  *
  8.  * Copyright (C) 1998 by Ralf Baechle
  9.  */
  10. #include <linux/init.h>
  11. #include <linux/kernel.h>
  12. #include <linux/mm.h>
  13. #include <asm/floppy.h>
  14. /*
  15.  * How to access the FDC's registers.
  16.  */
  17. static void no_fd_dummy(void)
  18. {
  19. panic("no_fd_dummy called - shouldn't happen");
  20. }
  21. static unsigned long no_fd_getfdaddr1(void)
  22. {
  23. return (unsigned long)-1; /* No FDC nowhere ... */
  24. }
  25. static unsigned long no_fd_drive_type(unsigned long n)
  26. {
  27. return 0;
  28. }
  29. struct fd_ops no_fd_ops = {
  30. /*
  31.  * How to access the floppy controller's ports
  32.  */
  33. (void *) no_fd_dummy,
  34. (void *) no_fd_dummy,
  35. /*
  36.  * How to access the floppy DMA functions.
  37.  */
  38. (void *) no_fd_dummy,
  39. (void *) no_fd_dummy,
  40. (void *) no_fd_dummy,
  41. (void *) no_fd_dummy,
  42. (void *) no_fd_dummy,
  43. (void *) no_fd_dummy,
  44. (void *) no_fd_dummy,
  45. (void *) no_fd_dummy,
  46. (void *) no_fd_dummy,
  47. (void *) no_fd_dummy,
  48. (void *) no_fd_dummy,
  49. no_fd_getfdaddr1,
  50. (void *) no_fd_dummy,
  51. (void *) no_fd_dummy,
  52. no_fd_drive_type
  53. };