Path: blob/master/arch/m68k/include/asm/atafdreg.h
10820 views
#ifndef _LINUX_FDREG_H1#define _LINUX_FDREG_H23/*4** WD1772 stuff5*/67/* register codes */89#define FDCSELREG_STP (0x80) /* command/status register */10#define FDCSELREG_TRA (0x82) /* track register */11#define FDCSELREG_SEC (0x84) /* sector register */12#define FDCSELREG_DTA (0x86) /* data register */1314/* register names for FDC_READ/WRITE macros */1516#define FDCREG_CMD 017#define FDCREG_STATUS 018#define FDCREG_TRACK 219#define FDCREG_SECTOR 420#define FDCREG_DATA 62122/* command opcodes */2324#define FDCCMD_RESTORE (0x00) /* - */25#define FDCCMD_SEEK (0x10) /* | */26#define FDCCMD_STEP (0x20) /* | TYP 1 Commands */27#define FDCCMD_STIN (0x40) /* | */28#define FDCCMD_STOT (0x60) /* - */29#define FDCCMD_RDSEC (0x80) /* - TYP 2 Commands */30#define FDCCMD_WRSEC (0xa0) /* - " */31#define FDCCMD_RDADR (0xc0) /* - */32#define FDCCMD_RDTRA (0xe0) /* | TYP 3 Commands */33#define FDCCMD_WRTRA (0xf0) /* - */34#define FDCCMD_FORCI (0xd0) /* - TYP 4 Command */3536/* command modifier bits */3738#define FDCCMDADD_SR6 (0x00) /* step rate settings */39#define FDCCMDADD_SR12 (0x01)40#define FDCCMDADD_SR2 (0x02)41#define FDCCMDADD_SR3 (0x03)42#define FDCCMDADD_V (0x04) /* verify */43#define FDCCMDADD_H (0x08) /* wait for spin-up */44#define FDCCMDADD_U (0x10) /* update track register */45#define FDCCMDADD_M (0x10) /* multiple sector access */46#define FDCCMDADD_E (0x04) /* head settling flag */47#define FDCCMDADD_P (0x02) /* precompensation off */48#define FDCCMDADD_A0 (0x01) /* DAM flag */4950/* status register bits */5152#define FDCSTAT_MOTORON (0x80) /* motor on */53#define FDCSTAT_WPROT (0x40) /* write protected (FDCCMD_WR*) */54#define FDCSTAT_SPINUP (0x20) /* motor speed stable (Type I) */55#define FDCSTAT_DELDAM (0x20) /* sector has deleted DAM (Type II+III) */56#define FDCSTAT_RECNF (0x10) /* record not found */57#define FDCSTAT_CRC (0x08) /* CRC error */58#define FDCSTAT_TR00 (0x04) /* Track 00 flag (Type I) */59#define FDCSTAT_LOST (0x04) /* Lost Data (Type II+III) */60#define FDCSTAT_IDX (0x02) /* Index status (Type I) */61#define FDCSTAT_DRQ (0x02) /* DRQ status (Type II+III) */62#define FDCSTAT_BUSY (0x01) /* FDC is busy */636465/* PSG Port A Bit Nr 0 .. Side Sel .. 0 -> Side 1 1 -> Side 2 */66#define DSKSIDE (0x01)6768#define DSKDRVNONE (0x06)69#define DSKDRV0 (0x02)70#define DSKDRV1 (0x04)7172/* step rates */73#define FDCSTEP_6 0x0074#define FDCSTEP_12 0x0175#define FDCSTEP_2 0x0276#define FDCSTEP_3 0x037778#endif798081