floppy.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Architecture specific parts of the Floppy driver
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 1995 - 2000 Ralf Baechle
  9. */
  10. #ifndef _ASM_FLOPPY_H
  11. #define _ASM_FLOPPY_H
  12. #include <linux/dma-mapping.h>
  13. static inline void fd_cacheflush(char * addr, long size)
  14. {
  15. dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL);
  16. }
  17. #define MAX_BUFFER_SECTORS 24
  18. /*
  19. * And on Mips's the CMOS info fails also ...
  20. *
  21. * FIXME: This information should come from the ARC configuration tree
  22. * or wherever a particular machine has stored this ...
  23. */
  24. #define FLOPPY0_TYPE fd_drive_type(0)
  25. #define FLOPPY1_TYPE fd_drive_type(1)
  26. #define FDC1 fd_getfdaddr1()
  27. #define N_FDC 1 /* do you *really* want a second controller? */
  28. #define N_DRIVE 8
  29. /*
  30. * The DMA channel used by the floppy controller cannot access data at
  31. * addresses >= 16MB
  32. *
  33. * Went back to the 1MB limit, as some people had problems with the floppy
  34. * driver otherwise. It doesn't matter much for performance anyway, as most
  35. * floppy accesses go through the track buffer.
  36. *
  37. * On MIPSes using vdma, this actually means that *all* transfers go thru
  38. * the * track buffer since 0x1000000 is always smaller than KSEG0/1.
  39. * Actually this needs to be a bit more complicated since the so much different
  40. * hardware available with MIPS CPUs ...
  41. */
  42. #define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
  43. #define EXTRA_FLOPPY_PARAMS
  44. #include <floppy.h>
  45. #endif /* _ASM_FLOPPY_H */