require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_ATA_SATAREG_H_)) {
    eval 'sub _DEV_ATA_SATAREG_H_ () {1;}' unless defined(&_DEV_ATA_SATAREG_H_);
    eval 'sub SStatus_DET_NODEV () {(0x << 0);}' unless defined(&SStatus_DET_NODEV);
    eval 'sub SStatus_DET_DEV_NE () {(0x1 << 0);}' unless defined(&SStatus_DET_DEV_NE);
    eval 'sub SStatus_DET_DEV () {(0x3 << 0);}' unless defined(&SStatus_DET_DEV);
    eval 'sub SStatus_DET_OFFLINE () {(0x4 << 0);}' unless defined(&SStatus_DET_OFFLINE);
    eval 'sub SStatus_DET_mask () {(0xf << 0);}' unless defined(&SStatus_DET_mask);
    eval 'sub SStatus_DET_shift () {0;}' unless defined(&SStatus_DET_shift);
    eval 'sub SStatus_SPD_NONE () {(0x << 4);}' unless defined(&SStatus_SPD_NONE);
    eval 'sub SStatus_SPD_G1 () {(0x1 << 4);}' unless defined(&SStatus_SPD_G1);
    eval 'sub SStatus_SPD_G2 () {(0x2 << 4);}' unless defined(&SStatus_SPD_G2);
    eval 'sub SStatus_SPD_mask () {(0xf << 4);}' unless defined(&SStatus_SPD_mask);
    eval 'sub SStatus_SPD_shift () {4;}' unless defined(&SStatus_SPD_shift);
    eval 'sub SStatus_IPM_NODEV () {(0x << 8);}' unless defined(&SStatus_IPM_NODEV);
    eval 'sub SStatus_IPM_ACTIVE () {(0x1 << 8);}' unless defined(&SStatus_IPM_ACTIVE);
    eval 'sub SStatus_IPM_PARTIAL () {(0x2 << 8);}' unless defined(&SStatus_IPM_PARTIAL);
    eval 'sub SStatus_IPM_SLUMBER () {(0x6 << 8);}' unless defined(&SStatus_IPM_SLUMBER);
    eval 'sub SStatus_IPM_mask () {(0xf << 8);}' unless defined(&SStatus_IPM_mask);
    eval 'sub SStatus_IPM_shift () {8;}' unless defined(&SStatus_IPM_shift);
    eval 'sub SError_ERR_I () {(1 << 0);}' unless defined(&SError_ERR_I);
    eval 'sub SError_ERR_M () {(1 << 1);}' unless defined(&SError_ERR_M);
    eval 'sub SError_ERR_T () {(1 << 8);}' unless defined(&SError_ERR_T);
    eval 'sub SError_ERR_C () {(1 << 9);}' unless defined(&SError_ERR_C);
    eval 'sub SError_ERR_P () {(1 << 10);}' unless defined(&SError_ERR_P);
    eval 'sub SError_ERR_E () {(1 << 11);}' unless defined(&SError_ERR_E);
    eval 'sub SError_DIAG_N () {(1 << 16);}' unless defined(&SError_DIAG_N);
    eval 'sub SError_DIAG_I () {(1 << 17);}' unless defined(&SError_DIAG_I);
    eval 'sub SError_DIAG_W () {(1 << 18);}' unless defined(&SError_DIAG_W);
    eval 'sub SError_DIAG_B () {(1 << 19);}' unless defined(&SError_DIAG_B);
    eval 'sub SError_DIAG_D () {(1 << 20);}' unless defined(&SError_DIAG_D);
    eval 'sub SError_DIAG_C () {(1 << 21);}' unless defined(&SError_DIAG_C);
    eval 'sub SError_DIAG_H () {(1 << 22);}' unless defined(&SError_DIAG_H);
    eval 'sub SError_DIAG_S () {(1 << 23);}' unless defined(&SError_DIAG_S);
    eval 'sub SError_DIAG_T () {(1 << 24);}' unless defined(&SError_DIAG_T);
    eval 'sub SError_DIAG_F () {(1 << 25);}' unless defined(&SError_DIAG_F);
    eval 'sub SError_DIAG_X () {(1 << 26);}' unless defined(&SError_DIAG_X);
    eval 'sub SControl_DET_NONE () {(0x << 0);}' unless defined(&SControl_DET_NONE);
    eval 'sub SControl_DET_INIT () {(0x1 << 0);}' unless defined(&SControl_DET_INIT);
    eval 'sub SControl_DET_DISABLE () {(0x4 << 0);}' unless defined(&SControl_DET_DISABLE);
    eval 'sub SControl_SPD_ANY () {(0x << 4);}' unless defined(&SControl_SPD_ANY);
    eval 'sub SControl_SPD_G1 () {(0x1 << 4);}' unless defined(&SControl_SPD_G1);
    eval 'sub SControl_SPD_G2 () {(0x2 << 4);}' unless defined(&SControl_SPD_G2);
    eval 'sub SControl_IPM_ANY () {(0x << 8);}' unless defined(&SControl_IPM_ANY);
    eval 'sub SControl_IPM_NOPARTIAL () {(0x1 << 8);}' unless defined(&SControl_IPM_NOPARTIAL);
    eval 'sub SControl_IPM_NOSLUMBER () {(0x2 << 8);}' unless defined(&SControl_IPM_NOSLUMBER);
    eval 'sub SControl_IPM_NONE () {(0x3 << 8);}' unless defined(&SControl_IPM_NONE);
    eval 'sub SControl_SPM_PARTIAL () {(0x1 << 12);}' unless defined(&SControl_SPM_PARTIAL);
    eval 'sub SControl_SPM_SLUMBER () {(0x2 << 12);}' unless defined(&SControl_SPM_SLUMBER);
    eval 'sub SControl_SPM_ComWake () {(0x4 << 12);}' unless defined(&SControl_SPM_ComWake);
    eval 'sub SControl_PMP {
        my($x) = @_;
	    eval q((($x) << 16));
    }' unless defined(&SControl_PMP);
}
1;
