]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/amifd.h
1 /* SPDX-License-Identifier: GPL-2.0 */
5 /* Definitions for the Amiga floppy driver */
9 #define FD_MAX_UNITS 4 /* Max. Number of drives */
10 #define FLOPPY_MAX_SECTORS 22 /* Max. Number of sectors per track */
15 char *name
; /* description of data type */
16 int sects
; /* sectors per track */
19 void (*write_fkt
)(int);
21 int (*read_fkt
)(); /* read whole track */
22 void (*write_fkt
)(); /* write whole track */
27 ** Floppy type descriptions
30 struct fd_drive_type
{
31 unsigned long code
; /* code returned from drive */
32 char *name
; /* description of drive */
33 unsigned int tracks
; /* number of tracks */
34 unsigned int heads
; /* number of heads */
35 unsigned int read_size
; /* raw read size for one track */
36 unsigned int write_size
; /* raw write size for one track */
37 unsigned int sect_mult
; /* sectors and gap multiplier (HD = 2) */
38 unsigned int precomp1
; /* start track for precomp 1 */
39 unsigned int precomp2
; /* start track for precomp 2 */
40 unsigned int step_delay
; /* time (in ms) for delay after step */
41 unsigned int settle_time
; /* time to settle after dir change */
42 unsigned int side_time
; /* time needed to change sides */
45 struct amiga_floppy_struct
{
46 struct fd_drive_type
*type
; /* type of floppy for this unit */
47 struct fd_data_type
*dtype
; /* type of floppy for this unit */
48 int track
; /* current track (-1 == unknown) */
49 unsigned char *trackbuf
; /* current track (kmaloc()'d */
51 int blocks
; /* total # blocks on disk */
53 int changed
; /* true when not known */
54 int disk
; /* disk in drive (-1 == unknown) */
55 int motor
; /* true when motor is at speed */
56 int busy
; /* true when drive is active */
57 int dirty
; /* true when trackbuf is not on disk */
58 int status
; /* current error code for unit */
59 struct gendisk
*gendisk
;