From: Stefan E. <se...@us...> - 2002-05-08 13:56:05
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv16690 Modified Files: ide.h Log Message: - ide_setfeature() command, and defines. Index: ide.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/ide.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ide.h 26 Apr 2002 09:23:03 -0000 1.3 +++ ide.h 8 May 2002 13:56:02 -0000 1.4 @@ -42,7 +42,8 @@ /* HDC internal command bytes (HDC_Cmd[7]) */ #define HDC_RECAL 0x10 /* 0001 0000 */ -#define HDC_READ 0x20 /* 0010 0000 */ +//#define HDC_READ 0x20 /* 0010 0000 */ +#define HDC_READ 0x21 /* 0010 0000 */ #define HDC_READ_LONG 0x22 /* 0010 0010 */ #define HDC_WRITE 0x30 /* 0011 0000 */ #define HDC_WRITE_LONG 0x32 /* 0011 0010 */ @@ -52,6 +53,20 @@ #define HDC_DIAG 0x90 /* 1001 0000 */ #define HDC_SET_PARAMS 0x91 /* 1001 0001 */ #define HDC_IDENTIFY 0xEC /* ask drive to identify itself */ +#define HDC_SETFEATURE 0xEF /* set ide feature, opcodes below */ + +/* SET FEATURE OPCODES */ +#define IDE_FEAT_8BITON 0x01 /* 8 bit io */ +#define IDE_FEAT_8BITOFF 0x81 /* set io transfer mode, parameter see below */ +#define IDE_FEAT_WCEN 0x02 /* write cache enable */ +#define IDE_FEAT_IOMODE 0x03 /* set io transfer mode, parameter see below */ + +/* IO transfermode Feature param */ +#define IDE_IOM_PIO 0x00 /* default PIO */ +#define IDE_IOM_PIO_noIORDY 0x01 /* PIO w/o IORDY */ +#define IDE_IOM_PIO_FC( x ) (0x4|(x&0x3)) /* PIO with flow control */ +#define IDE_IOM_DMA( x ) (0x10|(x&0x3)) /* multiple DMA, mode x */ +#define IDE_IOM_UDMA( x ) (0x20|(x&0x3)) /* UDMA, mode x */ #define HD_PORT 0x1f0 #define HD_REG_PORT 0x3f6 @@ -167,6 +182,8 @@ int ide_reset( ide_drive_t *drive ); int ide_identify_drive( ide_drive_t *drive ); + +int ide_setfeature( ide_drive_t *drive, unsigned char opcode, unsigned char param ); int hd_read( ide_drive_t *drive, int head, int sector, int cyl, char *buffer); |