1 #ifndef_ASM_M68K_AMIFD_H 2 #define_ASM_M68K_AMIFD_H 3
4 /* Definitions for the Amiga floppy driver */ 5
6 #include <linux/fd.h>
7
8 #defineFD_MAX_UNITS 4
9
10 structfd_data_type{ 11 char *name; /* description of data type */ 12 intsects; /* sectors per track */ 13 #ifdef__STDC__ 14 int (*read_fkt)(int, unsignedchar *, unsignedlong, int);
15 void (*write_fkt)(int, unsignedlong, unsignedchar *, int);
16 #else 17 int (*read_fkt)(); /* read whole track */ 18 void (*write_fkt)(); /* write whole track */ 19 #endif 20 };
21
22 #ifndefASSEMBLER 23 /* 24 ** Floppy type descriptions 25 */ 26
27 structfd_drive_type{ 28 unsignedlongcode; /* code returned from drive */ 29 char *name; /* description of drive */ 30 unsignedinttracks; /* number of tracks */ 31 unsignedintheads; /* number of heads */ 32 unsignedintread_size; /* raw read size for one track */ 33 unsignedintwrite_size; /* raw write size for one track */ 34 unsignedintsect_mult; /* sectors and gap multiplier (HD = 2) */ 35 unsignedintprecomp1; /* start track for precomp 1 */ 36 unsignedintprecomp2; /* start track for precomp 2 */ 37 unsignedintstep_delay; /* time (in ms) for delay after step */ 38 unsignedintsettle_time; /* time to settle after dir change */ 39 unsignedintside_time; /* time needed to change sides */ 40 };
41
42 structamiga_floppy_struct{ 43 structfd_drive_type *type; /* type of floppy for this unit */ 44 structfd_data_type *dtype; /* type of floppy for this unit */ 45 inttrack; /* current track (-1 == unknown) */ 46
47 intblocks; /* total # blocks on disk */ 48 intsects; /* number of sectors per track */ 49
50 intdisk; /* disk in drive (-1 == unknown) */ 51 intmotor; /* true when motor is at speed */ 52 intbusy; /* true when drive is active */ 53 intstatus; /* current error code for unit */ 54 };
55 #endif 56
57 #endif