xref: /onnv-gate/usr/src/uts/intel/io/dktp/controller/ata/ata_cmd.h (revision 5295:a21f2449e5f9)
11709Smlf /*
21709Smlf  * CDDL HEADER START
31709Smlf  *
41709Smlf  * The contents of this file are subject to the terms of the
5*5295Srandyf  * Common Development and Distribution License (the "License").
61709Smlf  * You may not use this file except in compliance with the License.
71709Smlf  *
81709Smlf  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91709Smlf  * or http://www.opensolaris.org/os/licensing.
101709Smlf  * See the License for the specific language governing permissions
111709Smlf  * and limitations under the License.
121709Smlf  *
131709Smlf  * When distributing Covered Code, include this CDDL HEADER in each
141709Smlf  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151709Smlf  * If applicable, add the following below this CDDL HEADER, with the
161709Smlf  * fields enclosed by brackets "[]" replaced with your own identifying
171709Smlf  * information: Portions Copyright [yyyy] [name of copyright owner]
181709Smlf  *
191709Smlf  * CDDL HEADER END
201709Smlf  */
211709Smlf 
221709Smlf /*
23*5295Srandyf  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
241709Smlf  * Use is subject to license terms.
251709Smlf  */
261709Smlf 
271709Smlf #ifndef _ATA_CMD_H
281709Smlf #define	_ATA_CMD_H
291709Smlf 
301709Smlf #pragma ident	"%Z%%M%	%I%	%E% SMI"
311709Smlf 
321709Smlf #ifdef	__cplusplus
331709Smlf extern "C" {
341709Smlf #endif
351709Smlf 
361709Smlf /*
371709Smlf  * Common ATA commands.
381709Smlf  */
391709Smlf #define	ATC_DIAG	0x90    /* diagnose command 			*/
401709Smlf #define	ATC_RECAL	0x10	/* restore cmd, bottom 4 bits step rate */
411709Smlf #define	ATC_FORMAT	0x50	/* format track command 		*/
421709Smlf #define	ATC_SET_FEAT	0xef	/* set features				*/
431709Smlf #define	ATC_IDLE_IMMED	0xe1	/* idle immediate			*/
441709Smlf #define	ATC_STANDBY_IM	0xe0	/* standby immediate			*/
451709Smlf #define	ATC_DOOR_LOCK	0xde	/* door lock				*/
461709Smlf #define	ATC_DOOR_UNLOCK	0xdf	/* door unlock				*/
471709Smlf #define	ATC_IDLE	0xe3	/* idle					*/
48*5295Srandyf #define	ATC_SLEEP	0xe6	/* sleep				*/
491709Smlf 
501709Smlf /*
511709Smlf  * ATA/ATAPI-4 disk commands.
521709Smlf  */
531709Smlf #define	ATC_DEVICE_RESET	0x08    /* ATAPI device reset */
541709Smlf #define	ATC_EJECT		0xed	/* media eject */
551709Smlf #define	ATC_FLUSH_CACHE		0xe7	/* flush write-cache */
561709Smlf #define	ATC_ID_DEVICE		0xec    /* IDENTIFY DEVICE */
571709Smlf #define	ATC_ID_PACKET_DEVICE	0xa1	/* ATAPI identify packet device */
581709Smlf #define	ATC_INIT_DEVPARMS	0x91	/* initialize device parameters */
591709Smlf #define	ATC_PACKET		0xa0	/* ATAPI packet */
601709Smlf #define	ATC_RDMULT		0xc4	/* read multiple */
611709Smlf #define	ATC_RDSEC		0x20    /* read sector */
621709Smlf #define	ATC_RDVER		0x40	/* read verify */
631709Smlf #define	ATC_READ_DMA		0xc8	/* read (multiple) w/DMA */
641709Smlf #define	ATC_SEEK		0x70    /* seek */
651709Smlf #define	ATC_SERVICE		0xa2	/* queued/overlap service */
661709Smlf #define	ATC_SETMULT		0xc6	/* set multiple mode */
671709Smlf #define	ATC_WRITE_DMA		0xca	/* write (multiple) w/DMA */
681709Smlf #define	ATC_WRMULT		0xc5	/* write multiple */
691709Smlf #define	ATC_WRSEC		0x30    /* write sector */
701709Smlf 
711709Smlf /*
721709Smlf  * Low bits for Read/Write commands...
731709Smlf  */
741709Smlf #define	ATCM_ECCRETRY	0x01    /* Enable ECC and RETRY by controller 	*/
751709Smlf 				/* enabled if bit is CLEARED!!! 	*/
761709Smlf #define	ATCM_LONGMODE	0x02    /* Use Long Mode (get/send data & ECC) 	*/
771709Smlf 
781709Smlf 
791709Smlf /*
801709Smlf  * Obsolete ATA commands.
811709Smlf  */
821709Smlf 
831709Smlf #define	ATC_RDLONG	0x23    /* read long without retry	*/
841709Smlf #define	ATC_ACK_MC	0xdb	/* acknowledge media change		*/
851709Smlf 
861709Smlf #ifdef	__cplusplus
871709Smlf }
881709Smlf #endif
891709Smlf 
901709Smlf #endif /* _ATA_CMD_H */
91