require '_h2ph_pre.ph';

unless(defined(&__ISADMA_COMPAT)) {
    eval 'sub __ISADMA_COMPAT () {1;}' unless defined(&__ISADMA_COMPAT);
}
if(defined(&__ISADMA_COMPAT)) {
    eval 'sub isadma_acquire {
        local($c) = @_;
	    eval q( &isa_dma_acquire( &isa_dev, ($c)));
    }' unless defined(&isadma_acquire);
    eval 'sub isadma_release {
        local($c) = @_;
	    eval q( &isa_dma_release( &isa_dev, ($c)));
    }' unless defined(&isadma_release);
    eval 'sub isadma_cascade {
        local($c) = @_;
	    eval q( &isa_dmacascade( &isa_dev, ($c)));
    }' unless defined(&isadma_cascade);
    eval 'sub isadma_start {
        local($a, $s, $c, $f) = @_;
	    eval q( &isa_dmastart( &isa_dev, ($c), ($a), ($s), 0, ($f),  &BUS_DMA_WAITOK| &BUS_DMA_BUS1));
    }' unless defined(&isadma_start);
    eval 'sub isadma_abort {
        local($c) = @_;
	    eval q( &isa_dmaabort( &isa_dev, ($c)));
    }' unless defined(&isadma_abort);
    eval 'sub isadma_finished {
        local($c) = @_;
	    eval q( &isa_dmafinished( &isa_dev, ($c)));
    }' unless defined(&isadma_finished);
    eval 'sub isadma_done {
        local($c) = @_;
	    eval q( &isa_dmadone( &isa_dev, ($c)));
    }' unless defined(&isadma_done);
}
unless(defined(&MAX_ISADMA)) {
    sub MAX_ISADMA () {	65536;}
}
unless(defined(&DMAMODE_WRITE)) {
    sub DMAMODE_WRITE () {	0;}
}
unless(defined(&DMAMODE_READ)) {
    sub DMAMODE_READ () {	1;}
}
unless(defined(&DMAMODE_LOOP)) {
    sub DMAMODE_LOOP () {	2;}
}
1;
