require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_PCIIDE_ACER_REG_H_)) {
    eval 'sub _DEV_PCI_PCIIDE_ACER_REG_H_ () {1;}' unless defined(&_DEV_PCI_PCIIDE_ACER_REG_H_);
    eval 'sub ACER_CCAR1 () {0x43;}' unless defined(&ACER_CCAR1);
    eval 'sub ACER_CHANSTATUS_RO () {0x40;}' unless defined(&ACER_CHANSTATUS_RO);
    eval 'sub PCIIDE_CHAN_RO {
        my($chan) = @_;
	    eval q((0x20 >> ($chan)));
    }' unless defined(&PCIIDE_CHAN_RO);
    eval 'sub ACER_0x4A () {0x4a;}' unless defined(&ACER_0x4A);
    eval 'sub ACER_0x4A_80PIN {
        my($chan) = @_;
	    eval q((0x1 << ($chan)));
    }' unless defined(&ACER_0x4A_80PIN);
    eval 'sub ACER_0x4B () {0x4b;}' unless defined(&ACER_0x4B);
    eval 'sub ACER_0x4B_UDMA66 () {0x1;}' unless defined(&ACER_0x4B_UDMA66);
    eval 'sub ACER_0x4B_CDETECT () {0x8;}' unless defined(&ACER_0x4B_CDETECT);
    eval 'sub ACER_CCAR2 () {0x4d;}' unless defined(&ACER_CCAR2);
    eval 'sub ACER_CHANSTATUSREGS_RO () {0x80;}' unless defined(&ACER_CHANSTATUSREGS_RO);
    eval 'sub ACER_CCAR3 () {0x50;}' unless defined(&ACER_CCAR3);
    eval 'sub ACER_CCAR3_PI () {0x2;}' unless defined(&ACER_CCAR3_PI);
    eval 'sub ACER_FCS () {0x52;}' unless defined(&ACER_FCS);
    eval 'sub ACER_FCS_TIMREG {
        my($chan,$drv) = @_;
	    eval q(((0x8) >> (($drv) + ($chan) * 2)));
    }' unless defined(&ACER_FCS_TIMREG);
    eval 'sub ACER_CDRC () {0x53;}' unless defined(&ACER_CDRC);
    eval 'sub ACER_CDRC_FIFO_DISABLE () {0x2;}' unless defined(&ACER_CDRC_FIFO_DISABLE);
    eval 'sub ACER_CDRC_DMA_EN () {0x1;}' unless defined(&ACER_CDRC_DMA_EN);
    eval 'sub ACER_FTH_UDMA () {0x54;}' unless defined(&ACER_FTH_UDMA);
    eval 'sub ACER_FTH_VAL {
        my($chan, $drv, $val) = @_;
	    eval q(((($val) & 0x3) << (($drv) * 4+ ($chan) * 8)));
    }' unless defined(&ACER_FTH_VAL);
    eval 'sub ACER_FTH_OPL {
        my($chan, $drv, $val) = @_;
	    eval q(((($val) & 0x3) << (2+ ($drv) * 4+ ($chan) * 8)));
    }' unless defined(&ACER_FTH_OPL);
    eval 'sub ACER_UDMA_EN {
        my($chan, $drv) = @_;
	    eval q((0x8 << (16+ ($drv) * 4+ ($chan) * 8)));
    }' unless defined(&ACER_UDMA_EN);
    eval 'sub ACER_UDMA_TIM {
        my($chan, $drv, $val) = @_;
	    eval q(((($val) & 0x7) << (16+ ($drv) * 4+ ($chan) * 8)));
    }' unless defined(&ACER_UDMA_TIM);
    eval 'sub ACER_IDETIM {
        my($chan, $drv) = @_;
	    eval q((0x5a + ($drv) + ($chan) * 4));
    }' unless defined(&ACER_IDETIM);
    eval 'sub ACER_CHIDS () {0x75;}' unless defined(&ACER_CHIDS);
    eval 'sub ACER_CHIDS_DRV {
        my($channel) = @_;
	    eval q(((0x4) << ($channel)));
    }' unless defined(&ACER_CHIDS_DRV);
    eval 'sub ACER_CHIDS_INT {
        my($channel) = @_;
	    eval q(((0x1) << ($channel)));
    }' unless defined(&ACER_CHIDS_INT);
    eval 'sub ACER_0x79 () {0x79;}' unless defined(&ACER_0x79);
    eval 'sub ACER_0x79_REVC2_EN () {0x4;}' unless defined(&ACER_0x79_REVC2_EN);
    eval 'sub ACER_0x79_EN () {0x2;}' unless defined(&ACER_0x79_EN);
    eval 'sub ACER_IDE_CLK () {0x78;}' unless defined(&ACER_IDE_CLK);
    if(defined(&unused)) {
    }
}
1;
