require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_PCIIDEVAR_H_)) {
    eval 'sub _DEV_PCI_PCIIDEVAR_H_ () {1;}' unless defined(&_DEV_PCI_PCIIDEVAR_H_);
    require 'dev/ata/atavar.ph';
    require 'dev/ic/wdcreg.ph';
    require 'dev/ic/wdcvar.ph';
    eval 'sub PCIIDE_MAX_CHANNELS () {4;}' unless defined(&PCIIDE_MAX_CHANNELS);
    eval 'sub PCIIDE_DMACMD_READ {
        my($sc, $chan) = @_;
	    eval q(($sc)-> &sc_dmacmd_read(($sc), ($chan)));
    }' unless defined(&PCIIDE_DMACMD_READ);
    eval 'sub PCIIDE_DMACMD_WRITE {
        my($sc, $chan, $val) = @_;
	    eval q(($sc)-> &sc_dmacmd_write(($sc), ($chan), ($val)));
    }' unless defined(&PCIIDE_DMACMD_WRITE);
    eval 'sub PCIIDE_DMACTL_READ {
        my($sc, $chan) = @_;
	    eval q(($sc)-> &sc_dmactl_read(($sc), ($chan)));
    }' unless defined(&PCIIDE_DMACTL_READ);
    eval 'sub PCIIDE_DMACTL_WRITE {
        my($sc, $chan, $val) = @_;
	    eval q(($sc)-> &sc_dmactl_write(($sc), ($chan), ($val)));
    }' unless defined(&PCIIDE_DMACTL_WRITE);
    eval 'sub PCIIDE_DMATBL_WRITE {
        my($sc, $chan, $val) = @_;
	    eval q(($sc)-> &sc_dmatbl_write(($sc), ($chan), ($val)));
    }' unless defined(&PCIIDE_DMATBL_WRITE);
    if(!defined( &pciide_machdep_compat_intr_establish)) {
    }
}
1;
