amifdreg.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef _LINUX_AMIFDREG_H
  2. #define _LINUX_AMIFDREG_H
  3. /*
  4. ** CIAAPRA bits (read only)
  5. */
  6. #define DSKRDY (0x1<<5) /* disk ready when low */
  7. #define DSKTRACK0 (0x1<<4) /* head at track zero when low */
  8. #define DSKPROT (0x1<<3) /* disk protected when low */
  9. #define DSKCHANGE (0x1<<2) /* low when disk removed */
  10. /*
  11. ** CIAAPRB bits (read/write)
  12. */
  13. #define DSKMOTOR (0x1<<7) /* motor on when low */
  14. #define DSKSEL3 (0x1<<6) /* select drive 3 when low */
  15. #define DSKSEL2 (0x1<<5) /* select drive 2 when low */
  16. #define DSKSEL1 (0x1<<4) /* select drive 1 when low */
  17. #define DSKSEL0 (0x1<<3) /* select drive 0 when low */
  18. #define DSKSIDE (0x1<<2) /* side selection: 0 = upper, 1 = lower */
  19. #define DSKDIREC (0x1<<1) /* step direction: 0=in, 1=out (to trk 0) */
  20. #define DSKSTEP (0x1) /* pulse low to step head 1 track */
  21. /*
  22. ** DSKBYTR bits (read only)
  23. */
  24. #define DSKBYT (1<<15) /* register contains valid byte when set */
  25. #define DMAON (1<<14) /* disk DMA enabled */
  26. #define DISKWRITE (1<<13) /* disk write bit in DSKLEN enabled */
  27. #define WORDEQUAL (1<<12) /* DSKSYNC register match when true */
  28. /* bits 7-0 are data */
  29. /*
  30. ** ADKCON/ADKCONR bits
  31. */
  32. #ifndef SETCLR
  33. #define ADK_SETCLR (1<<15) /* control bit */
  34. #endif
  35. #define ADK_PRECOMP1 (1<<14) /* precompensation selection */
  36. #define ADK_PRECOMP0 (1<<13) /* 00=none, 01=140ns, 10=280ns, 11=500ns */
  37. #define ADK_MFMPREC (1<<12) /* 0=GCR precomp., 1=MFM precomp. */
  38. #define ADK_WORDSYNC (1<<10) /* enable DSKSYNC auto DMA */
  39. #define ADK_MSBSYNC (1<<9) /* when 1, enable sync on MSbit (for GCR) */
  40. #define ADK_FAST (1<<8) /* bit cell: 0=2us (GCR), 1=1us (MFM) */
  41. /*
  42. ** DSKLEN bits
  43. */
  44. #define DSKLEN_DMAEN (1<<15)
  45. #define DSKLEN_WRITE (1<<14)
  46. /*
  47. ** INTENA/INTREQ bits
  48. */
  49. #define DSKINDEX (0x1<<4) /* DSKINDEX bit */
  50. /*
  51. ** Misc
  52. */
  53. #define MFM_SYNC 0x4489 /* standard MFM sync value */
  54. /* Values for FD_COMMAND */
  55. #define FD_RECALIBRATE 0x07 /* move to track 0 */
  56. #define FD_SEEK 0x0F /* seek track */
  57. #define FD_READ 0xE6 /* read with MT, MFM, SKip deleted */
  58. #define FD_WRITE 0xC5 /* write with MT, MFM */
  59. #define FD_SENSEI 0x08 /* Sense Interrupt Status */
  60. #define FD_SPECIFY 0x03 /* specify HUT etc */
  61. #define FD_FORMAT 0x4D /* format one track */
  62. #define FD_VERSION 0x10 /* get version code */
  63. #define FD_CONFIGURE 0x13 /* configure FIFO operation */
  64. #define FD_PERPENDICULAR 0x12 /* perpendicular r/w mode */
  65. #endif /* _LINUX_AMIFDREG_H */