Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
422 | giacomo | 1 | #ifndef _AMIFD_H |
2 | #define _AMIFD_H |
||
3 | |||
4 | /* Definitions for the Amiga floppy driver */ |
||
5 | |||
6 | #include <linux/fd.h> |
||
7 | |||
8 | #define FD_MAX_UNITS 4 /* Max. Number of drives */ |
||
9 | #define FLOPPY_MAX_SECTORS 22 /* Max. Number of sectors per track */ |
||
10 | |||
11 | #ifndef ASSEMBLER |
||
12 | |||
13 | struct fd_data_type { |
||
14 | char *name; /* description of data type */ |
||
15 | int sects; /* sectors per track */ |
||
16 | #ifdef __STDC__ |
||
17 | int (*read_fkt)(int); |
||
18 | void (*write_fkt)(int); |
||
19 | #else |
||
20 | int (*read_fkt)(); /* read whole track */ |
||
21 | void (*write_fkt)(); /* write whole track */ |
||
22 | #endif |
||
23 | }; |
||
24 | |||
25 | /* |
||
26 | ** Floppy type descriptions |
||
27 | */ |
||
28 | |||
29 | struct fd_drive_type { |
||
30 | unsigned long code; /* code returned from drive */ |
||
31 | char *name; /* description of drive */ |
||
32 | unsigned int tracks; /* number of tracks */ |
||
33 | unsigned int heads; /* number of heads */ |
||
34 | unsigned int read_size; /* raw read size for one track */ |
||
35 | unsigned int write_size; /* raw write size for one track */ |
||
36 | unsigned int sect_mult; /* sectors and gap multiplier (HD = 2) */ |
||
37 | unsigned int precomp1; /* start track for precomp 1 */ |
||
38 | unsigned int precomp2; /* start track for precomp 2 */ |
||
39 | unsigned int step_delay; /* time (in ms) for delay after step */ |
||
40 | unsigned int settle_time; /* time to settle after dir change */ |
||
41 | unsigned int side_time; /* time needed to change sides */ |
||
42 | }; |
||
43 | |||
44 | struct amiga_floppy_struct { |
||
45 | struct fd_drive_type *type; /* type of floppy for this unit */ |
||
46 | struct fd_data_type *dtype; /* type of floppy for this unit */ |
||
47 | int track; /* current track (-1 == unknown) */ |
||
48 | unsigned char *trackbuf; /* current track (kmaloc()'d */ |
||
49 | |||
50 | int blocks; /* total # blocks on disk */ |
||
51 | |||
52 | int changed; /* true when not known */ |
||
53 | int disk; /* disk in drive (-1 == unknown) */ |
||
54 | int motor; /* true when motor is at speed */ |
||
55 | int busy; /* true when drive is active */ |
||
56 | int dirty; /* true when trackbuf is not on disk */ |
||
57 | int status; /* current error code for unit */ |
||
58 | struct gendisk *gendisk; |
||
59 | }; |
||
60 | #endif |
||
61 | |||
62 | #endif |