atapi_reg.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 64 行

H
64
字号
/*******************************************************************
 * 
 *  Copyright C 2005 by Amlogic, Inc. All Rights Reserved.
 *
 *  Description: 
 *
 *  Author: Amlogic Software
 *  Created: Thu Nov 10 23:57:10 2005
 *
 *******************************************************************/


#ifndef ATAPI_REG_H
#define ATAPI_REG_H

/******************************************************************************
 *  Register Operations
 ******************************************************************************/

#define ATAPI_DATA_REG_T25 	 	 (ISABASE+(0x1f0 << 2))
#define ATAPI_ERROR_REG_T25      (ISABASE+(0x1f1 << 2))
#define ATAPI_INTERRUPT_REG_T25  (ISABASE+(0x1f2 << 2))
#define ATAPI_BCOUNTL_REG_T25    (ISABASE+(0x1f4 << 2))
#define ATAPI_BCOUNTH_REG_T25    (ISABASE+(0x1f5 << 2))
#define ATAPI_DRVSEL_REG_T25     (ISABASE+(0x1f6 << 2))
#define ATAPI_STATUS_REG_T25     (ISABASE+(0x1f7 << 2))
#define ATAPI_ALTSTATUS_REG_T25  (ISABASE+(0x3f6 << 2))

#define ATAPI_FEATURE_REG_T25    ATAPI_ERROR_REG_T25
#define ATAPI_COMMAND_REG_T25    ATAPI_STATUS_REG_T25
#define ATAPI_CONTROL_REG_T25    ATAPI_ALTSTATUS_REG_T25


#define BUSY_STATUS               0x80
#define DRDY_STATUS               0x40
#define DF_STATUS                 0x20
#define DSC_STATUS                0x10
#define DRQ_STATUS                0x08
#define CORR_STATUS               0x04
#define IDX_STATUS                0x02
#define ERR_STATUS                0x01

#define ATAPI_COMMAND_BUSY              0xff
#define ATAPI_COMMAND_SUCCESS           0x00
#define ATAPI_COMMAND_FAIL              0x01



#define MASTER	0xa0
#define SLAVE	0xb0

#define AGID                0x00
#define CHALLENGE_KEY       0x01
#define KEY1                0x02
#define KEY2                0x03
#define TITLE_KEY           0x04
#define ASF                 0x05
#define SEND_RPC            0x06
#define READ_RPC            0x08
#define INVALID_AGID        0x3f


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?