atapi.h revision 507c32411f3f101e90ca2120f042b5ee698ba1d5
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1997 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ATAPI_H
#define _ATAPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Additional atapi status bits (redefinitions)
*/
/*
* Status bits from ATAPI Interrupt reason register (AT_COUNT) register
*/
/* ATAPI feature reg definitions */
#define ATF_OVERLAP 0x02
/*
* ATAPI IDENTIFY_DRIVE configuration word
*/
#define ATAPI_ID_CFG_PKT_SZ 0x3
#define ATAPI_ID_CFG_PKT_12B 0x0
#define ATAPI_ID_CFG_PKT_16B 0x1
#define ATAPI_ID_CFG_DRQ_TYPE 0x60
#define ATAPI_ID_CFG_DRQ_INTR 0x20
#define ATAPI_ID_CFG_DEV_TYPE 0x0f00
#define ATAPI_ID_CFG_DEV_SHFT 8
/*
* ATAPI IDENTIFY_DRIVE capabilities word
*/
#define ATAPI_ID_CAP_DMA 0x0100
#define ATAPI_ID_CAP_OVERLAP 0x2000
/* ATAPI SET FEATURE commands */
#define ATAPI_FEAT_RELEASE_INTR 0x5d
#define ATAPI_FEAT_SERVICE_INTR 0x5e
/*
* ATAPI bits
*/
#define ATAPI_SECTOR_SIZE 2048
#define ATAPI_HEADS 64
#define ATAPI_SECTORS_PER_TRK 32
/* Useful macros */
/* public function prototypes */
#ifdef __cplusplus
}
#endif
#endif /* _ATAPI_H */