require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_PIIXREG_H_)) {
    eval 'sub _DEV_PCI_PIIXREG_H_ () {1;}' unless defined(&_DEV_PCI_PIIXREG_H_);
    eval 'sub PIIX_SMB_BASE () {0x90;}' unless defined(&PIIX_SMB_BASE);
    eval 'sub PIIX_SMB_HOSTC () {0xd0;}' unless defined(&PIIX_SMB_HOSTC);
    eval 'sub PIIX_SMB_HOSTC_HSTEN () {(1<< 16);}' unless defined(&PIIX_SMB_HOSTC_HSTEN);
    eval 'sub PIIX_SMB_HOSTC_SMI () {(0<< 17);}' unless defined(&PIIX_SMB_HOSTC_SMI);
    eval 'sub PIIX_SMB_HOSTC_IRQ () {(4<< 17);}' unless defined(&PIIX_SMB_HOSTC_IRQ);
    eval 'sub PIIX_SMB_HOSTC_INTMASK () {(7<< 17);}' unless defined(&PIIX_SMB_HOSTC_INTMASK);
    eval 'sub PIIX_SMB_HS () {0x;}' unless defined(&PIIX_SMB_HS);
    eval 'sub PIIX_SMB_HS_BUSY () {(1<< 0);}' unless defined(&PIIX_SMB_HS_BUSY);
    eval 'sub PIIX_SMB_HS_INTR () {(1<< 1);}' unless defined(&PIIX_SMB_HS_INTR);
    eval 'sub PIIX_SMB_HS_DEVERR () {(1<< 2);}' unless defined(&PIIX_SMB_HS_DEVERR);
    eval 'sub PIIX_SMB_HS_BUSERR () {(1<< 3);}' unless defined(&PIIX_SMB_HS_BUSERR);
    eval 'sub PIIX_SMB_HS_FAILED () {(1<< 4);}' unless defined(&PIIX_SMB_HS_FAILED);
    eval 'sub PIIX_SMB_HS_BITS () {"\\020\\001BUSY\\002INTR\\003DEVERR\\004BUSERR\\005FAILED";}' unless defined(&PIIX_SMB_HS_BITS);
    eval 'sub PIIX_SMB_HC () {0x2;}' unless defined(&PIIX_SMB_HC);
    eval 'sub PIIX_SMB_HC_INTREN () {(1<< 0);}' unless defined(&PIIX_SMB_HC_INTREN);
    eval 'sub PIIX_SMB_HC_KILL () {(1<< 1);}' unless defined(&PIIX_SMB_HC_KILL);
    eval 'sub PIIX_SMB_HC_CMD_QUICK () {(0<< 2);}' unless defined(&PIIX_SMB_HC_CMD_QUICK);
    eval 'sub PIIX_SMB_HC_CMD_BYTE () {(1<< 2);}' unless defined(&PIIX_SMB_HC_CMD_BYTE);
    eval 'sub PIIX_SMB_HC_CMD_BDATA () {(2<< 2);}' unless defined(&PIIX_SMB_HC_CMD_BDATA);
    eval 'sub PIIX_SMB_HC_CMD_WDATA () {(3<< 2);}' unless defined(&PIIX_SMB_HC_CMD_WDATA);
    eval 'sub PIIX_SMB_HC_CMD_BLOCK () {(5<< 2);}' unless defined(&PIIX_SMB_HC_CMD_BLOCK);
    eval 'sub PIIX_SMB_HC_START () {(1<< 6);}' unless defined(&PIIX_SMB_HC_START);
    eval 'sub PIIX_SMB_HCMD () {0x3;}' unless defined(&PIIX_SMB_HCMD);
    eval 'sub PIIX_SMB_TXSLVA () {0x4;}' unless defined(&PIIX_SMB_TXSLVA);
    eval 'sub PIIX_SMB_TXSLVA_READ () {(1<< 0);}' unless defined(&PIIX_SMB_TXSLVA_READ);
    eval 'sub PIIX_SMB_TXSLVA_ADDR {
        my($x) = @_;
	    eval q(((($x) & 0x7f) << 1));
    }' unless defined(&PIIX_SMB_TXSLVA_ADDR);
    eval 'sub PIIX_SMB_HD0 () {0x5;}' unless defined(&PIIX_SMB_HD0);
    eval 'sub PIIX_SMB_HD1 () {0x6;}' unless defined(&PIIX_SMB_HD1);
    eval 'sub PIIX_SMB_HBDB () {0x7;}' unless defined(&PIIX_SMB_HBDB);
    eval 'sub PIIX_SMB_SC () {0x8;}' unless defined(&PIIX_SMB_SC);
    eval 'sub PIIX_SMB_SC_ALERTEN () {(1<< 3);}' unless defined(&PIIX_SMB_SC_ALERTEN);
    eval 'sub PIIX_SMB_SIZE () {0x10;}' unless defined(&PIIX_SMB_SIZE);
}
1;
