require '_h2ph_pre.ph';

unless(defined(&WDCTL_4BIT)) {
    sub WDCTL_4BIT () {	0x08;}
}
unless(defined(&WDCTL_RST)) {
    sub WDCTL_RST () {	0x04;}
}
unless(defined(&WDCTL_IDS)) {
    sub WDCTL_IDS () {	0x02;}
}
if(0) {
    eval 'sub wd_digin () {1;}' unless defined(&wd_digin);
}
unless(defined(&WDCS_BSY)) {
    sub WDCS_BSY () {	0x80;}
}
unless(defined(&WDCS_DRDY)) {
    sub WDCS_DRDY () {	0x40;}
}
unless(defined(&WDCS_DWF)) {
    sub WDCS_DWF () {	0x20;}
}
unless(defined(&WDCS_DSC)) {
    sub WDCS_DSC () {	0x10;}
}
unless(defined(&WDCS_DRQ)) {
    sub WDCS_DRQ () {	0x08;}
}
unless(defined(&WDCS_CORR)) {
    sub WDCS_CORR () {	0x04;}
}
unless(defined(&WDCS_IDX)) {
    sub WDCS_IDX () {	0x02;}
}
unless(defined(&WDCS_ERR)) {
    sub WDCS_ERR () {	0x01;}
}
unless(defined(&WDCS_BITS)) {
    sub WDCS_BITS () {	"\020\010bsy\007drdy\006dwf\005dsc\004drq\003corr\002idx\001err";}
}
unless(defined(&WDCE_BBK)) {
    sub WDCE_BBK () {	0x80;}
}
unless(defined(&WDCE_CRC)) {
    sub WDCE_CRC () {	0x80;}
}
unless(defined(&WDCE_UNC)) {
    sub WDCE_UNC () {	0x40;}
}
unless(defined(&WDCE_MC)) {
    sub WDCE_MC () {	0x20;}
}
unless(defined(&WDCE_IDNF)) {
    sub WDCE_IDNF () {	0x10;}
}
unless(defined(&WDCE_MCR)) {
    sub WDCE_MCR () {	0x08;}
}
unless(defined(&WDCE_ABRT)) {
    sub WDCE_ABRT () {	0x04;}
}
unless(defined(&WDCE_TK0NF)) {
    sub WDCE_TK0NF () {	0x02;}
}
unless(defined(&WDCE_AMNF)) {
    sub WDCE_AMNF () {	0x01;}
}
unless(defined(&WDCC_NOP)) {
    sub WDCC_NOP () {	0x00;}
}
unless(defined(&WDCC_RECAL)) {
    sub WDCC_RECAL () {	0x10;}
}
unless(defined(&WDCC_READ)) {
    sub WDCC_READ () {	0x20;}
}
unless(defined(&WDCC_WRITE)) {
    sub WDCC_WRITE () {	0x30;}
}
unless(defined(&WDCC__LONG)) {
    sub WDCC__LONG () {	0x02;}
}
unless(defined(&WDCC__NORETRY)) {
    sub WDCC__NORETRY () {	0x01;}
}
unless(defined(&WDCC_FORMAT)) {
    sub WDCC_FORMAT () {	0x50;}
}
unless(defined(&WDCC_DIAGNOSE)) {
    sub WDCC_DIAGNOSE () {	0x90;}
}
unless(defined(&WDCC_IDP)) {
    sub WDCC_IDP () {	0x91;}
}
unless(defined(&WDCC_READMULTI)) {
    sub WDCC_READMULTI () {	0xc4;}
}
unless(defined(&WDCC_WRITEMULTI)) {
    sub WDCC_WRITEMULTI () {	0xc5;}
}
unless(defined(&WDCC_SETMULTI)) {
    sub WDCC_SETMULTI () {	0xc6;}
}
unless(defined(&WDCC_READDMA)) {
    sub WDCC_READDMA () {	0xc8;}
}
unless(defined(&WDCC_WRITEDMA)) {
    sub WDCC_WRITEDMA () {	0xca;}
}
unless(defined(&WDCC_ACKMC)) {
    sub WDCC_ACKMC () {	0xdb;}
}
unless(defined(&WDCC_LOCK)) {
    sub WDCC_LOCK () {	0xde;}
}
unless(defined(&WDCC_UNLOCK)) {
    sub WDCC_UNLOCK () {	0xdf;}
}
unless(defined(&WDCC_FLUSHCACHE)) {
    sub WDCC_FLUSHCACHE () {	0xe7;}
}
unless(defined(&WDCC_IDENTIFY)) {
    sub WDCC_IDENTIFY () {	0xec;}
}
unless(defined(&SET_FEATURES)) {
    sub SET_FEATURES () {	0xef;}
}
unless(defined(&WDCC_IDLE)) {
    sub WDCC_IDLE () {	0xe3;}
}
unless(defined(&WDCC_IDLE_IMMED)) {
    sub WDCC_IDLE_IMMED () {	0xe1;}
}
unless(defined(&WDCC_SLEEP)) {
    sub WDCC_SLEEP () {	0xe6;}
}
unless(defined(&WDCC_STANDBY)) {
    sub WDCC_STANDBY () {	0xe2;}
}
unless(defined(&WDCC_STANDBY_IMMED)) {
    sub WDCC_STANDBY_IMMED () {	0xe0;}
}
unless(defined(&WDCC_CHECK_PWR)) {
    sub WDCC_CHECK_PWR () {	0xe5;}
}
unless(defined(&WDSF_EN_WR_CACHE)) {
    sub WDSF_EN_WR_CACHE () {	0x02;}
}
unless(defined(&WDSF_SET_MODE)) {
    sub WDSF_SET_MODE () {	0x03;}
}
unless(defined(&WDSF_REASSIGN_EN)) {
    sub WDSF_REASSIGN_EN () {	0x04;}
}
unless(defined(&WDSF_RETRY_DS)) {
    sub WDSF_RETRY_DS () {	0x33;}
}
unless(defined(&WDSF_SET_CACHE_SGMT)) {
    sub WDSF_SET_CACHE_SGMT () {	0x54;}
}
unless(defined(&WDSF_READAHEAD_DS)) {
    sub WDSF_READAHEAD_DS () {	0x55;}
}
unless(defined(&WDSF_POD_DS)) {
    sub WDSF_POD_DS () {	0x66;}
}
unless(defined(&WDSF_ECC_DS)) {
    sub WDSF_ECC_DS () {	0x77;}
}
unless(defined(&WDSF_WRITE_CACHE_DS)) {
    sub WDSF_WRITE_CACHE_DS () {	0x82;}
}
unless(defined(&WDSF_REASSIGN_DS)) {
    sub WDSF_REASSIGN_DS () {	0x84;}
}
unless(defined(&WDSF_ECC_EN)) {
    sub WDSF_ECC_EN () {	0x88;}
}
unless(defined(&WDSF_RETRY_EN)) {
    sub WDSF_RETRY_EN () {	0x99;}
}
unless(defined(&WDSF_SET_CURRENT)) {
    sub WDSF_SET_CURRENT () {	0x9a;}
}
unless(defined(&WDSF_READAHEAD_EN)) {
    sub WDSF_READAHEAD_EN () {	0xaa;}
}
unless(defined(&WDSF_PREFETCH_SET)) {
    sub WDSF_PREFETCH_SET () {	0xab;}
}
unless(defined(&WDSF_POD_EN)) {
    sub WDSF_POD_EN () {	0xcc;}
}
unless(defined(&WDSD_IBM)) {
    sub WDSD_IBM () {	0xa0;}
}
unless(defined(&WDSD_CHS)) {
    sub WDSD_CHS () {	0x00;}
}
unless(defined(&WDSD_LBA)) {
    sub WDSD_LBA () {	0x40;}
}
unless(defined(&ATAPI_CHECK_POWER_MODE)) {
    sub ATAPI_CHECK_POWER_MODE () {	0xe5;}
}
unless(defined(&ATAPI_EXEC_DRIVE_DIAGS)) {
    sub ATAPI_EXEC_DRIVE_DIAGS () {	0x90;}
}
unless(defined(&ATAPI_IDLE_IMMEDIATE)) {
    sub ATAPI_IDLE_IMMEDIATE () {	0xe1;}
}
unless(defined(&ATAPI_NOP)) {
    sub ATAPI_NOP () {	0x00;}
}
unless(defined(&ATAPI_PKT_CMD)) {
    sub ATAPI_PKT_CMD () {	0xa0;}
}
unless(defined(&ATAPI_IDENTIFY_DEVICE)) {
    sub ATAPI_IDENTIFY_DEVICE () {	0xa1;}
}
unless(defined(&ATAPI_SOFT_RESET)) {
    sub ATAPI_SOFT_RESET () {	0x08;}
}
unless(defined(&ATAPI_SLEEP)) {
    sub ATAPI_SLEEP () {	0xe6;}
}
unless(defined(&ATAPI_STANDBY_IMMEDIATE)) {
    sub ATAPI_STANDBY_IMMEDIATE () {	0xe0;}
}
unless(defined(&ATAPI_PKT_CMD_FTRE_DMA)) {
    sub ATAPI_PKT_CMD_FTRE_DMA () {	0x01;}
}
unless(defined(&ATAPI_PKT_CMD_FTRE_OVL)) {
    sub ATAPI_PKT_CMD_FTRE_OVL () {	0x02;}
}
unless(defined(&WDCI_CMD)) {
    sub WDCI_CMD () {	0x01;}
}
unless(defined(&WDCI_IN)) {
    sub WDCI_IN () {	0x02;}
}
unless(defined(&WDCI_RELEASE)) {
    sub WDCI_RELEASE () {	0x04;}
}
unless(defined(&PHASE_CMDOUT)) {
    sub PHASE_CMDOUT () {	( &WDCS_DRQ |  &WDCI_CMD);}
}
unless(defined(&PHASE_DATAIN)) {
    sub PHASE_DATAIN () {	( &WDCS_DRQ |  &WDCI_IN);}
}
unless(defined(&PHASE_DATAOUT)) {
    sub PHASE_DATAOUT () {	 &WDCS_DRQ;}
}
unless(defined(&PHASE_COMPLETED)) {
    sub PHASE_COMPLETED () {	( &WDCI_IN |  &WDCI_CMD);}
}
unless(defined(&PHASE_ABORTED)) {
    sub PHASE_ABORTED () {	0;}
}
1;
