require '_h2ph_pre.ph';

unless(defined(&WDC_CFG_ATAPI_MASK)) {
    sub WDC_CFG_ATAPI_MASK () {	0xc000;}
}
unless(defined(&WDC_CFG_ATAPI)) {
    sub WDC_CFG_ATAPI () {	0x8000;}
}
unless(defined(&ATA_CFG_REMOVABLE)) {
    sub ATA_CFG_REMOVABLE () {	0x0080;}
}
unless(defined(&ATA_CFG_FIXED)) {
    sub ATA_CFG_FIXED () {	0x0040;}
}
unless(defined(&ATAPI_CFG_TYPE_MASK)) {
    sub ATAPI_CFG_TYPE_MASK () {	0x1f00;}
}
unless(defined(&ATAPI_CFG_TYPE)) {
    sub ATAPI_CFG_TYPE {
	local($x) = @_;
	eval q(((($x) &  &ATAPI_CFG_TYPE_MASK) >> 8));
    }
}
unless(defined(&ATAPI_CFG_TYPE_DIRECT)) {
    sub ATAPI_CFG_TYPE_DIRECT () {	0x00;}
}
unless(defined(&ATAPI_CFG_TYPE_SEQUENTIAL)) {
    sub ATAPI_CFG_TYPE_SEQUENTIAL () {	0x01;}
}
unless(defined(&ATAPI_CFG_TYPE_CDROM)) {
    sub ATAPI_CFG_TYPE_CDROM () {	0x05;}
}
unless(defined(&ATAPI_CFG_TYPE_OPTICAL)) {
    sub ATAPI_CFG_TYPE_OPTICAL () {	0x07;}
}
unless(defined(&ATAPI_CFG_TYPE_NODEVICE)) {
    sub ATAPI_CFG_TYPE_NODEVICE () {	0x1f;}
}
unless(defined(&ATAPI_CFG_REMOV)) {
    sub ATAPI_CFG_REMOV () {	0x0080;}
}
unless(defined(&ATAPI_CFG_DRQ_MASK)) {
    sub ATAPI_CFG_DRQ_MASK () {	0x0060;}
}
unless(defined(&ATAPI_CFG_STD_DRQ)) {
    sub ATAPI_CFG_STD_DRQ () {	0x0000;}
}
unless(defined(&ATAPI_CFG_IRQ_DRQ)) {
    sub ATAPI_CFG_IRQ_DRQ () {	0x0020;}
}
unless(defined(&ATAPI_CFG_ACCEL_DRQ)) {
    sub ATAPI_CFG_ACCEL_DRQ () {	0x0040;}
}
unless(defined(&ATAPI_CFG_CMD_MASK)) {
    sub ATAPI_CFG_CMD_MASK () {	0x0003;}
}
unless(defined(&ATAPI_CFG_CMD_12)) {
    sub ATAPI_CFG_CMD_12 () {	0x0000;}
}
unless(defined(&ATAPI_CFG_CMD_16)) {
    sub ATAPI_CFG_CMD_16 () {	0x0001;}
}
unless(defined(&WDC_CAP_IORDY)) {
    sub WDC_CAP_IORDY () {	0x0800;}
}
unless(defined(&WDC_CAP_IORDY_DSBL)) {
    sub WDC_CAP_IORDY_DSBL () {	0x0400;}
}
unless(defined(&WDC_CAP_LBA)) {
    sub WDC_CAP_LBA () {	0x0200;}
}
unless(defined(&WDC_CAP_DMA)) {
    sub WDC_CAP_DMA () {	0x0100;}
}
unless(defined(&ATA_CAP_STBY)) {
    sub ATA_CAP_STBY () {	0x2000;}
}
unless(defined(&ATAPI_CAP_INTERL_DMA)) {
    sub ATAPI_CAP_INTERL_DMA () {	0x8000;}
}
unless(defined(&ATAPI_CAP_CMD_QUEUE)) {
    sub ATAPI_CAP_CMD_QUEUE () {	0x4000;}
}
unless(defined(&ATAPI_CAP_OVERLP)) {
    sub ATAPI_CAP_OVERLP () {	0x2000;}
}
unless(defined(&ATAPI_CAP_ATA_RST)) {
    sub ATAPI_CAP_ATA_RST () {	0x1000;}
}
if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0)) {
} else {
}
unless(defined(&WDC_EXT_UDMA_MODES)) {
    sub WDC_EXT_UDMA_MODES () {	0x0004;}
}
unless(defined(&WDC_EXT_MODES)) {
    sub WDC_EXT_MODES () {	0x0002;}
}
unless(defined(&WDC_EXT_GEOM)) {
    sub WDC_EXT_GEOM () {	0x0001;}
}
unless(defined(&WDC_MULTI_VALID)) {
    sub WDC_MULTI_VALID () {	0x0100;}
}
unless(defined(&WDC_MULTI_MASK)) {
    sub WDC_MULTI_MASK () {	0x00ff;}
}
if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0)) {
} else {
}
unless(defined(&WDC_QUEUE_DEPTH_MASK)) {
    sub WDC_QUEUE_DEPTH_MASK () {	0x0f;}
}
unless(defined(&WDC_VER_ATA1)) {
    sub WDC_VER_ATA1 () {	0x0002;}
}
unless(defined(&WDC_VER_ATA2)) {
    sub WDC_VER_ATA2 () {	0x0004;}
}
unless(defined(&WDC_VER_ATA3)) {
    sub WDC_VER_ATA3 () {	0x0008;}
}
unless(defined(&WDC_VER_ATA4)) {
    sub WDC_VER_ATA4 () {	0x0010;}
}
unless(defined(&WDC_VER_ATA5)) {
    sub WDC_VER_ATA5 () {	0x0020;}
}
unless(defined(&WDC_CMD1_NOP)) {
    sub WDC_CMD1_NOP () {	0x4000;}
}
unless(defined(&WDC_CMD1_RB)) {
    sub WDC_CMD1_RB () {	0x2000;}
}
unless(defined(&WDC_CMD1_WB)) {
    sub WDC_CMD1_WB () {	0x1000;}
}
unless(defined(&WDC_CMD1_HPA)) {
    sub WDC_CMD1_HPA () {	0x0400;}
}
unless(defined(&WDC_CMD1_DVRST)) {
    sub WDC_CMD1_DVRST () {	0x0200;}
}
unless(defined(&WDC_CMD1_SRV)) {
    sub WDC_CMD1_SRV () {	0x0100;}
}
unless(defined(&WDC_CMD1_RLSE)) {
    sub WDC_CMD1_RLSE () {	0x0080;}
}
unless(defined(&WDC_CMD1_AHEAD)) {
    sub WDC_CMD1_AHEAD () {	0x0040;}
}
unless(defined(&WDC_CMD1_CACHE)) {
    sub WDC_CMD1_CACHE () {	0x0020;}
}
unless(defined(&WDC_CMD1_PKT)) {
    sub WDC_CMD1_PKT () {	0x0010;}
}
unless(defined(&WDC_CMD1_PM)) {
    sub WDC_CMD1_PM () {	0x0008;}
}
unless(defined(&WDC_CMD1_REMOV)) {
    sub WDC_CMD1_REMOV () {	0x0004;}
}
unless(defined(&WDC_CMD1_SEC)) {
    sub WDC_CMD1_SEC () {	0x0002;}
}
unless(defined(&WDC_CMD1_SMART)) {
    sub WDC_CMD1_SMART () {	0x0001;}
}
unless(defined(&WDC_CMD2_RMSN)) {
    sub WDC_CMD2_RMSN () {	0x0010;}
}
unless(defined(&WDC_CMD2_DM)) {
    sub WDC_CMD2_DM () {	0x0001;}
}
unless(defined(&ATA_CMD2_APM)) {
    sub ATA_CMD2_APM () {	0x0008;}
}
unless(defined(&ATA_CMD2_CFA)) {
    sub ATA_CMD2_CFA () {	0x0004;}
}
unless(defined(&ATA_CMD2_RWQ)) {
    sub ATA_CMD2_RWQ () {	0x0002;}
}
if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0)) {
} else {
}
unless(defined(&WDC_RMSN_SUPP_MASK)) {
    sub WDC_RMSN_SUPP_MASK () {	0x0003;}
}
unless(defined(&WDC_RMSN_SUPP)) {
    sub WDC_RMSN_SUPP () {	0x0001;}
}
unless(defined(&WDC_SEC_LEV_MAX)) {
    sub WDC_SEC_LEV_MAX () {	0x0100;}
}
unless(defined(&WDC_SEC_ESE_SUPP)) {
    sub WDC_SEC_ESE_SUPP () {	0x0020;}
}
unless(defined(&WDC_SEC_EXP)) {
    sub WDC_SEC_EXP () {	0x0010;}
}
unless(defined(&WDC_SEC_FROZEN)) {
    sub WDC_SEC_FROZEN () {	0x0008;}
}
unless(defined(&WDC_SEC_LOCKED)) {
    sub WDC_SEC_LOCKED () {	0x0004;}
}
unless(defined(&WDC_SEC_EN)) {
    sub WDC_SEC_EN () {	0x0002;}
}
unless(defined(&WDC_SEC_SUPP)) {
    sub WDC_SEC_SUPP () {	0x0001;}
}
1;
